Cleanup. Fix failing test

This commit is contained in:
Jan Eitzinger 2022-09-20 13:07:46 +02:00
parent 0c4096eda3
commit 35114aeb2d
5 changed files with 6 additions and 8 deletions

View File

@ -44,7 +44,6 @@ import (
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
_ "github.com/mattn/go-sqlite3" _ "github.com/mattn/go-sqlite3"
_ "github.com/santhosh-tekuri/jsonschema/v5/httploader"
) )
func main() { func main() {

View File

@ -6,8 +6,6 @@ package config
import ( import (
"testing" "testing"
_ "github.com/santhosh-tekuri/jsonschema/v5/httploader"
) )
func TestInit(t *testing.T) { func TestInit(t *testing.T) {

View File

@ -27,9 +27,12 @@ func setupUserTest(t *testing.T) *UserCfgRepo {
"clusters": [ "clusters": [
{ {
"name": "testcluster", "name": "testcluster",
"metricDataRepository": {"kind": "test"} "metricDataRepository": {"kind": "test", "url": "bla:8081"},
} "filterRanges": {
] "numNodes": { "from": 1, "to": 64 },
"duration": { "from": 0, "to": 86400 },
"startTime": { "from": "2022-01-01T00:00:00Z", "to": null }
} } ]
}` }`
tmpdir := t.TempDir() tmpdir := t.TempDir()
cfgFilePath := filepath.Join(tmpdir, "config.json") cfgFilePath := filepath.Join(tmpdir, "config.json")

View File

@ -11,7 +11,6 @@ import (
"time" "time"
"github.com/ClusterCockpit/cc-backend/pkg/schema" "github.com/ClusterCockpit/cc-backend/pkg/schema"
_ "github.com/santhosh-tekuri/jsonschema/v5/httploader"
) )
func TestInitEmptyPath(t *testing.T) { func TestInitEmptyPath(t *testing.T) {

View File

@ -24,7 +24,6 @@ import (
"github.com/gorilla/mux" "github.com/gorilla/mux"
_ "github.com/mattn/go-sqlite3" _ "github.com/mattn/go-sqlite3"
_ "github.com/santhosh-tekuri/jsonschema/v5/httploader"
) )
func setup(t *testing.T) *api.RestApi { func setup(t *testing.T) *api.RestApi {