Skip to content

Commit

Permalink
go1.22~ added package build errors to the test output
Browse files Browse the repository at this point in the history
Update the golden file for new output.
  • Loading branch information
dnephin committed Mar 22, 2024
1 parent 7f53872 commit 92e8e74
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
schedule:
interval: weekly
4 changes: 4 additions & 0 deletions cmd/main_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"bytes"
goversion "go/version"

Check failure on line 5 in cmd/main_e2e_test.go

View workflow job for this annotation

GitHub Actions / Build (oldstable, ubuntu-latest)

package go/version is not in std (/opt/hostedtoolcache/go/1.21.8/x64/src/go/version)

Check failure on line 5 in cmd/main_e2e_test.go

View workflow job for this annotation

GitHub Actions / Build (oldstable, ubuntu-latest)

package go/version is not in std (/opt/hostedtoolcache/go/1.21.8/x64/src/go/version)
"io/ioutil"
"os"
"path/filepath"
Expand Down Expand Up @@ -31,6 +32,9 @@ func TestE2E_RerunFails(t *testing.T) {
if testing.Short() {
t.Skip("too slow for short run")
}
if v := runtime.Version(); goversion.Compare(v, "go1.22") < 0 {
t.Skipf("version %v no longer supported by this test", v)
}
t.Setenv("GITHUB_ACTIONS", "no")

type testCase struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
FAIL testjson/internal/broken

=== Failed
=== FAIL: testjson/internal/broken
FAIL gotest.tools/gotestsum/testjson/internal/broken [build failed]

=== Errors
../testjson/internal/broken/broken.go:5:21: undefined: somepackage

DONE 0 tests, 1 error
DONE 0 tests, 1 failure, 1 error

0 comments on commit 92e8e74

Please sign in to comment.