Skip to content

Commit

Permalink
cmd/go: remove TestGoTestDetectsTestOnlyImportCycles
Browse files Browse the repository at this point in the history
The error that's tested in this test is also tested in list_test_err.txt
which uses go list -test -deps. Because both commands are just loading
packages, the difference is not meaningful.

Updates #36320
Updates #17751

Change-Id: Ie712a77d64e8985dd908a1afb515ed3ecc0a9985
Reviewed-on: https://go-review.googlesource.com/c/go/+/212937
Run-TryBot: Michael Matloob <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Jay Conrod <[email protected]>
  • Loading branch information
matloob committed Jan 3, 2020
1 parent 8cc2b73 commit 4ffd1a0
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 53 deletions.
11 changes: 0 additions & 11 deletions src/cmd/go/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2653,17 +2653,6 @@ func TestGoBuildTestOnly(t *testing.T) {
tg.run("install", "./testonly...")
}

func TestGoTestDetectsTestOnlyImportCycles(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
tg.setenv("GOPATH", filepath.Join(tg.pwd(), "testdata"))
tg.runFail("test", "-c", "testcycle/p3")
tg.grepStderr("import cycle not allowed in test", "go test testcycle/p3 produced unexpected error")

tg.runFail("test", "-c", "testcycle/q1")
tg.grepStderr("import cycle not allowed in test", "go test testcycle/q1 produced unexpected error")
}

func TestGoTestFooTestWorks(t *testing.T) {
tg := testgo(t)
defer tg.cleanup()
Expand Down
7 changes: 0 additions & 7 deletions src/cmd/go/testdata/src/testcycle/p1/p1.go

This file was deleted.

6 changes: 0 additions & 6 deletions src/cmd/go/testdata/src/testcycle/p1/p1_test.go

This file was deleted.

7 changes: 0 additions & 7 deletions src/cmd/go/testdata/src/testcycle/p2/p2.go

This file was deleted.

5 changes: 0 additions & 5 deletions src/cmd/go/testdata/src/testcycle/p3/p3.go

This file was deleted.

10 changes: 0 additions & 10 deletions src/cmd/go/testdata/src/testcycle/p3/p3_test.go

This file was deleted.

1 change: 0 additions & 1 deletion src/cmd/go/testdata/src/testcycle/q1/q1.go

This file was deleted.

6 changes: 0 additions & 6 deletions src/cmd/go/testdata/src/testcycle/q1/q1_test.go

This file was deleted.

0 comments on commit 4ffd1a0

Please sign in to comment.