diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-11-26 09:35:36 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-11-26 09:35:36 +0100 |
commit | d2c01af19e621d73e8279c1a2106cf9628c60494 (patch) | |
tree | 2865013f912a70e3d55fd68e21403cbf728d7b3f /client | |
parent | cd08519116e0f05bc8155f7d1155247f86e5b4a1 (diff) |
Use test file basename as default name
Diffstat (limited to 'client')
-rw-r--r-- | client/go/cmd/test.go | 2 | ||||
-rw-r--r-- | client/go/cmd/test_test.go | 2 | ||||
-rw-r--r-- | client/go/cmd/testdata/tests/expected-suite.out | 32 |
3 files changed, 18 insertions, 18 deletions
diff --git a/client/go/cmd/test.go b/client/go/cmd/test.go index 53cf2f6b6af..f659ac71be2 100644 --- a/client/go/cmd/test.go +++ b/client/go/cmd/test.go @@ -111,7 +111,7 @@ func runTest(testPath string, target vespa.Target) string { testName := test.Name if test.Name == "" { - testName = testPath + testName = filepath.Base(testPath) } fmt.Fprintf(stdout, "Running %s:", testName) diff --git a/client/go/cmd/test_test.go b/client/go/cmd/test_test.go index 598f550359e..5001ed438c0 100644 --- a/client/go/cmd/test_test.go +++ b/client/go/cmd/test_test.go @@ -45,7 +45,7 @@ func TestProductionTest(t *testing.T) { client := &mockHttpClient{} client.NextStatus(200) outBytes, errBytes := execute(command{args: []string{"test", "testdata/tests/production-test/external.json"}}, t, client) - assert.Equal(t, "Running testdata/tests/production-test/external.json: . OK\n\n1 tests completed successfully\n", outBytes) + assert.Equal(t, "Running external.json: . OK\n\n1 tests completed successfully\n", outBytes) assert.Equal(t, "", errBytes) assertRequests([]*http.Request{createRequest("GET", "https://my.service:123/path?query=wohoo", "")}, client, t) } diff --git a/client/go/cmd/testdata/tests/expected-suite.out b/client/go/cmd/testdata/tests/expected-suite.out index f214f3cf160..bef3d678957 100644 --- a/client/go/cmd/testdata/tests/expected-suite.out +++ b/client/go/cmd/testdata/tests/expected-suite.out @@ -1,5 +1,5 @@ Running my test: .... OK -Running testdata/tests/system-test/wrong-bool-value.json: Failed step 1: +Running wrong-bool-value.json: Failed step 1: Unexpected value at /root/coverage/full: true Expected: false Actual response: @@ -38,7 +38,7 @@ Actual response: } } -Running testdata/tests/system-test/wrong-element-count.json: Failed step 1: +Running wrong-element-count.json: Failed step 1: Unexpected number of elements at /root/children: 1 Expected: 0 Actual response: @@ -77,7 +77,7 @@ Actual response: } } -Running testdata/tests/system-test/wrong-field-name.json: Failed step 1: +Running wrong-field-name.json: Failed step 1: Missing expected field at /root/fields/totalCountDracula Actual response: { @@ -115,7 +115,7 @@ Actual response: } } -Running testdata/tests/system-test/wrong-float-value.json: Failed step 1: +Running wrong-float-value.json: Failed step 1: Unexpected value at /root/children/0/relevance: 0.38186238359951247 Expected: 0.381862373599 Actual response: @@ -154,7 +154,7 @@ Actual response: } } -Running testdata/tests/system-test/wrong-int-value.json: Failed step 1: +Running wrong-int-value.json: Failed step 1: Unexpected value at /root/fields/totalCount: 1 Expected: 2 Actual response: @@ -193,7 +193,7 @@ Actual response: } } -Running testdata/tests/system-test/wrong-null-value.json: Failed step 1: +Running wrong-null-value.json: Failed step 1: Missing expected field at /boot Actual response: { @@ -231,7 +231,7 @@ Actual response: } } -Running testdata/tests/system-test/wrong-string-value.json: Failed step 1: +Running wrong-string-value.json: Failed step 1: Unexpected value at /root/children/0/fields/artist: "Foo Fighters" Expected: "Boo Fighters" Actual response: @@ -270,7 +270,7 @@ Actual response: } } -Running testdata/tests/system-test/wrong-type.json: Failed step 1: +Running wrong-type.json: Failed step 1: Unexpected type at /root/fields/totalCount: 1 Expected: "1" Actual response: @@ -310,11 +310,11 @@ Actual response: } Failed 8 of 9 tests: -testdata/tests/system-test/wrong-bool-value.json: step 1: Unexpected value at /root/coverage/full: true -testdata/tests/system-test/wrong-element-count.json: step 1: Unexpected number of elements at /root/children: 1 -testdata/tests/system-test/wrong-field-name.json: step 1: Missing expected field at /root/fields/totalCountDracula -testdata/tests/system-test/wrong-float-value.json: step 1: Unexpected value at /root/children/0/relevance: 0.38186238359951247 -testdata/tests/system-test/wrong-int-value.json: step 1: Unexpected value at /root/fields/totalCount: 1 -testdata/tests/system-test/wrong-null-value.json: step 1: Missing expected field at /boot -testdata/tests/system-test/wrong-string-value.json: step 1: Unexpected value at /root/children/0/fields/artist: "Foo Fighters" -testdata/tests/system-test/wrong-type.json: step 1: Unexpected type at /root/fields/totalCount: 1 +wrong-bool-value.json: step 1: Unexpected value at /root/coverage/full: true +wrong-element-count.json: step 1: Unexpected number of elements at /root/children: 1 +wrong-field-name.json: step 1: Missing expected field at /root/fields/totalCountDracula +wrong-float-value.json: step 1: Unexpected value at /root/children/0/relevance: 0.38186238359951247 +wrong-int-value.json: step 1: Unexpected value at /root/fields/totalCount: 1 +wrong-null-value.json: step 1: Missing expected field at /boot +wrong-string-value.json: step 1: Unexpected value at /root/children/0/fields/artist: "Foo Fighters" +wrong-type.json: step 1: Unexpected type at /root/fields/totalCount: 1 |