Added tests and coverage to makefile, updated dependencies, added tests

This commit is contained in:
Marc Ole Bulling
2024-06-09 17:43:45 +02:00
parent 98e20beaff
commit b14d9f9e51
14 changed files with 342 additions and 64 deletions
@@ -6,7 +6,6 @@ import (
"github.com/forceu/gokapi/internal/models"
"github.com/forceu/gokapi/internal/test"
"github.com/forceu/gokapi/internal/test/testconfiguration"
"github.com/r3labs/sse/v2"
"os"
"testing"
"time"
@@ -22,8 +21,6 @@ func TestMain(m *testing.M) {
func TestSetStatus(t *testing.T) {
Init(sse.New())
chunkID := "testChunkID"
testCases := []struct {
name string
@@ -58,9 +55,4 @@ func TestSetStatus(t *testing.T) {
test.IsEqualInt(t, tc.newStatus, updatedStatus.CurrentStatus)
})
}
sseServer = nil
defer test.ExpectPanic(t)
passNewStatus(models.UploadStatus{})
}