diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-11-26 14:31:01 +0100 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-11-26 14:31:01 +0100 |
commit | 9790a9a832394e8e3c48c44fbbc77eff7e669bc3 (patch) | |
tree | a12c73ac43b525376864f6b2de560b06e566b8ae /client | |
parent | 1bca1eac3c8bb8375976266593274f0ce158b634 (diff) |
Avoid printing anything about tests when doing submit
Diffstat (limited to 'client')
-rw-r--r-- | client/go/cmd/prod_test.go | 1 | ||||
-rw-r--r-- | client/go/cmd/test.go | 26 |
2 files changed, 14 insertions, 13 deletions
diff --git a/client/go/cmd/prod_test.go b/client/go/cmd/prod_test.go index 771a79f0fde..a4f3ebd6b56 100644 --- a/client/go/cmd/prod_test.go +++ b/client/go/cmd/prod_test.go @@ -168,7 +168,6 @@ func TestProdSubmit(t *testing.T) { } out, err := execute(command{homeDir: homeDir, args: []string{"prod", "submit"}}, t, httpClient) assert.Equal(t, "", err) - assert.Contains(t, out, "Validating test.json: . OK") assert.Contains(t, out, "Success: Submitted") assert.Contains(t, out, "See https://console.vespa.oath.cloud/tenant/t1/application/a1/prod/deployment for deployment progress") } diff --git a/client/go/cmd/test.go b/client/go/cmd/test.go index 8122c321cdc..25418b4dcb5 100644 --- a/client/go/cmd/test.go +++ b/client/go/cmd/test.go @@ -116,11 +116,9 @@ func runTest(testPath string, target vespa.Target, dryRun bool) string { if test.Name == "" { testName = filepath.Base(testPath) } - verb := "Running" - if dryRun { - verb = "Validating" + if !dryRun { + fmt.Fprintf(stdout, "Running %s:", testName) } - fmt.Fprintf(stdout, "%s %s:", verb, testName) defaultParameters, err := getParameters(test.Defaults.ParametersRaw, path.Dir(testPath)) if err != nil { @@ -139,16 +137,20 @@ func runTest(testPath string, target vespa.Target, dryRun bool) string { if err != nil { fatalErr(err, fmt.Sprintf("Error in %s", stepName), "See https://cloud.vespa.ai/en/reference/testing") } - if failure != "" { - fmt.Fprintf(stdout, " Failed %s:\n%s\n", stepName, longFailure) - return fmt.Sprintf("%s: %s: %s", testName, stepName, failure) - } - if i == 0 { - fmt.Fprintf(stdout, " ") + if !dryRun { + if failure != "" { + fmt.Fprintf(stdout, " Failed %s:\n%s\n", stepName, longFailure) + return fmt.Sprintf("%s: %s: %s", testName, stepName, failure) + } + if i == 0 { + fmt.Fprintf(stdout, " ") + } + fmt.Fprint(stdout, ".") } - fmt.Fprint(stdout, ".") } - fmt.Fprintln(stdout, " OK") + if !dryRun { + fmt.Fprintln(stdout, " OK") + } return "" } |