diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-11-26 09:39:15 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-11-26 09:39:15 +0100 |
commit | 0b6ddbe050c8e20429ed02db72609001bfea82ae (patch) | |
tree | a3264ae98e253468de384a7349e39abfad084229 /client | |
parent | d2c01af19e621d73e8279c1a2106cf9628c60494 (diff) |
Fix singular/plural tests
Diffstat (limited to 'client')
-rw-r--r-- | client/go/cmd/test.go | 6 | ||||
-rw-r--r-- | client/go/cmd/test_test.go | 2 | ||||
-rw-r--r-- | client/go/cmd/testdata/tests/expected.out | 2 |
3 files changed, 7 insertions, 3 deletions
diff --git a/client/go/cmd/test.go b/client/go/cmd/test.go index f659ac71be2..d6fdc9d2e41 100644 --- a/client/go/cmd/test.go +++ b/client/go/cmd/test.go @@ -57,7 +57,11 @@ $ vespa test src/test/application/tests/system-test/feed-and-query.json`, fmt.Fprintf(stdout, "Failed to find any tests at %v\n", testPath) exitFunc(3) } else { - fmt.Fprintf(stdout, "\n%d tests completed successfully\n", count) + plural := "s" + if count == 1 { + plural = "" + } + fmt.Fprintf(stdout, "\n%d test%s completed successfully\n", count, plural) } }, } diff --git a/client/go/cmd/test_test.go b/client/go/cmd/test_test.go index 5001ed438c0..fe04e3a704a 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 external.json: . OK\n\n1 tests completed successfully\n", outBytes) + assert.Equal(t, "Running external.json: . OK\n\n1 test 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.out b/client/go/cmd/testdata/tests/expected.out index b41f001cd25..d144dbe2cfa 100644 --- a/client/go/cmd/testdata/tests/expected.out +++ b/client/go/cmd/testdata/tests/expected.out @@ -1,3 +1,3 @@ Running my test: .... OK -1 tests completed successfully +1 test completed successfully |