diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-11-24 17:22:19 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-11-24 17:22:19 +0100 |
commit | e8e51d23c43f6e43ba914b9aa02ad09724d6c040 (patch) | |
tree | 09bc8052ced875678ff1fec789ae228fa557ebac /client | |
parent | a151693a4a6b847744b7da55edde62c3413e6c75 (diff) |
No empty lines after successes
Diffstat (limited to 'client')
-rw-r--r-- | client/go/cmd/test.go | 12 | ||||
-rw-r--r-- | client/go/cmd/testdata/tests/expected-suite.out | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/client/go/cmd/test.go b/client/go/cmd/test.go index fa2e47ce5d3..b5399bd213a 100644 --- a/client/go/cmd/test.go +++ b/client/go/cmd/test.go @@ -56,7 +56,7 @@ $ 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, "%d tests completed successfully\n", count) + fmt.Fprintf(stdout, "\n%d tests completed successfully\n", count) } }, } @@ -71,12 +71,18 @@ func runTests(rootPath string, target vespa.Target) (int, []string) { if err != nil { fatalErr(err, "Failed reading specified test directory") } + previousFailed := false for _, test := range tests { if !test.IsDir() && filepath.Ext(test.Name()) == ".json" { testPath := path.Join(rootPath, test.Name()) + if previousFailed { + fmt.Fprintln(stdout, "") + previousFailed = false + } failure := runTest(testPath, target) if failure != "" { failed = append(failed, failure) + previousFailed = true } count++ } @@ -126,7 +132,7 @@ func runTest(testPath string, target vespa.Target) string { fatalErr(err, fmt.Sprintf("Error in %s", stepName)) } if failure != "" { - fmt.Fprintf(stdout, " Failed %s:\n%s\n\n", stepName, longFailure) + fmt.Fprintf(stdout, " Failed %s:\n%s\n", stepName, longFailure) return fmt.Sprintf("%s: %s: %s", testName, stepName, failure) } if i == 0 { @@ -134,7 +140,7 @@ func runTest(testPath string, target vespa.Target) string { } fmt.Fprint(stdout, ".") } - fmt.Fprintf(stdout, " OK\n\n") + fmt.Fprintln(stdout, " OK") return "" } diff --git a/client/go/cmd/testdata/tests/expected-suite.out b/client/go/cmd/testdata/tests/expected-suite.out index 1830b879353..f214f3cf160 100644 --- a/client/go/cmd/testdata/tests/expected-suite.out +++ b/client/go/cmd/testdata/tests/expected-suite.out @@ -1,5 +1,4 @@ Running my test: .... OK - Running testdata/tests/system-test/wrong-bool-value.json: Failed step 1: Unexpected value at /root/coverage/full: true Expected: false @@ -310,7 +309,6 @@ 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 |