diff --git a/.gitignore b/.gitignore index 6340afc..36b051f 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /web/frontend/public/build /web/frontend/node_modules +.vscode/settings.json diff --git a/pkg/schema/schemas/config.schema.json b/pkg/schema/schemas/config.schema.json index d4e993b..3731aee 100644 --- a/pkg/schema/schemas/config.schema.json +++ b/pkg/schema/schemas/config.schema.json @@ -140,7 +140,8 @@ "enum": [ "influxdb-v2", "prometheus", - "cc-metric-store" + "cc-metric-store", + "test" ] }, "url": { diff --git a/test/api_test.go b/test/api_test.go index 72341e1..250776c 100644 --- a/test/api_test.go +++ b/test/api_test.go @@ -38,12 +38,17 @@ func setup(t *testing.T) *api.RestApi { "clusters": [ { "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 } + } } ] }` const testclusterJson = `{ -"name": "testcluster", + "name": "testcluster", "subClusters": [ { "name": "sc0", @@ -64,12 +69,10 @@ func setup(t *testing.T) *api.RestApi { "socket": [[0, 1, 2, 3, 4, 5, 6, 7]], "memoryDomain": [[0, 1, 2, 3, 4, 5, 6, 7]], "die": [[0, 1, 2, 3, 4, 5, 6, 7]], - "core": [[0], [1], [2], [3], [4], [5], [6], [7]], - "accelerators": [] + "core": [[0], [1], [2], [3], [4], [5], [6], [7]] } } ], - "metricDataRepository": {"kind": "test"}, "metricConfig": [ { "name": "load_one", @@ -81,7 +84,7 @@ func setup(t *testing.T) *api.RestApi { "caution": 0, "alert": 0 } - ], + ] }` tmpdir := t.TempDir() @@ -111,7 +114,7 @@ func setup(t *testing.T) *api.RestApi { } config.Init(cfgFilePath) - archiveCfg := fmt.Sprintf("{\"kind\":\"file\",\"path\":\"%s\"}", jobarchive) + archiveCfg := fmt.Sprintf("{\"kind\": \"file\",\"path\": \"%s\"}", jobarchive) repository.Connect("sqlite3", dbfilepath) db := repository.GetConnection()