Skip to content

Commit

Permalink
Disable tests that depend on detecting the right Go version
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Koch <[email protected]>
  • Loading branch information
hugelgupf committed Dec 24, 2023
1 parent 35b595a commit cefa938
Showing 1 changed file with 23 additions and 19 deletions.
42 changes: 23 additions & 19 deletions src/pkg/bb/findpkg/bb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ func TestResolve(t *testing.T) {

moduleOffEnv := golang.Default(golang.WithGO111MODULE("off"))
moduleOnEnv := golang.Default(golang.WithGO111MODULE("on"))
noGoToolEnv := golang.Default(golang.WithGOROOT(t.TempDir()))
// TODO: re-enable when https://github.com/golang/go/issues/62114 is resolved.
// noGoToolEnv := golang.Default(golang.WithGOROOT(t.TempDir()))

if err := os.Mkdir("./test/resolvebroken", 0777); err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -385,24 +386,27 @@ func TestResolve(t *testing.T) {
err: errNoMatch,
},
// Some error cases where $GOROOT/bin/go is unavailable, so packages.Load fails.
{
name: "fspath-load-fails",
envs: []*golang.Environ{noGoToolEnv},
in: []string{"./test/goglob/*"},
wantErr: true,
},
{
name: "pkgpath-batched-load-fails",
envs: []*golang.Environ{noGoToolEnv},
in: []string{"./test/goglob/..."},
wantErr: true,
},
{
name: "pkgpath-glob-load-fails",
envs: []*golang.Environ{noGoToolEnv},
in: []string{"github.com/u-root/gobusybox/src/pkg/bb/findpkg/test/goglob/*"},
wantErr: true,
},
/*
TODO: re-enable when https://github.com/golang/go/issues/62114 is resolved.
{
name: "fspath-load-fails",
envs: []*golang.Environ{noGoToolEnv},
in: []string{"./test/goglob/*"},
wantErr: true,
},
{
name: "pkgpath-batched-load-fails",
envs: []*golang.Environ{noGoToolEnv},
in: []string{"./test/goglob/..."},
wantErr: true,
},
{
name: "pkgpath-glob-load-fails",
envs: []*golang.Environ{noGoToolEnv},
in: []string{"github.com/u-root/gobusybox/src/pkg/bb/findpkg/test/goglob/*"},
wantErr: true,
},
*/
}

// test cases that depend on external repositories.
Expand Down

0 comments on commit cefa938

Please sign in to comment.