Skip to content

Commit

Permalink
Fix e2e test failure
Browse files Browse the repository at this point in the history
Use an explicit format so that the env var set in CI doesn't change the output
And update the golden file to match.
  • Loading branch information
dnephin committed Mar 30, 2022
1 parent 90a5a10 commit bba51ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 6 additions & 2 deletions cmd/main_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,12 @@ func TestE2E_IgnoresWarnings(t *testing.T) {
}

flags, opts := setupFlags("gotestsum")
args := []string{"--rerun-fails=1", "--packages=./testdata/e2e/ignore_warnings/", "--", "-tags=testdata",
"-cover", "-coverpkg=github.com/pkg/errors"}
args := []string{
"--rerun-fails=1",
"--packages=./testdata/e2e/ignore_warnings/",
"--format=testname",
"--", "-tags=testdata", "-cover", "-coverpkg=github.com/pkg/errors",
}
assert.NilError(t, flags.Parse(args))
opts.args = flags.Args()

Expand Down
12 changes: 10 additions & 2 deletions cmd/testdata/e2e/expected/TestE2E_IgnoresWarnings
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
✖ cmd/testdata/e2e/ignore_warnings
=== RUN TestIgnoreWarnings
--- FAIL: TestIgnoreWarnings
FAIL cmd/testdata/e2e/ignore_warnings.TestIgnoreWarnings
coverage: [no statements]
FAIL cmd/testdata/e2e/ignore_warnings

DONE 1 tests, 1 failure

✖ cmd/testdata/e2e/ignore_warnings
=== RUN TestIgnoreWarnings
--- FAIL: TestIgnoreWarnings
FAIL cmd/testdata/e2e/ignore_warnings.TestIgnoreWarnings (re-run 1)
coverage: [no statements]
FAIL cmd/testdata/e2e/ignore_warnings

=== Failed
=== FAIL: cmd/testdata/e2e/ignore_warnings TestIgnoreWarnings
Expand Down

0 comments on commit bba51ac

Please sign in to comment.