Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,27 @@ workflows:
executor:
name: go/golang
tag: 1.18-alpine
post-steps: &xgenerics
post-steps: &othermods
- run:
name: "test x/generics"
working_directory: ./x/generics
command: gotestsum -ftestname
- run:
name: "test cmd/migrate-from-testify"
working_directory: ./cmd/migrate-from-testify
command: gotestsum -ftestname
- go/test:
name: test-golang-1.19
executor:
name: go/golang
tag: 1.19-alpine
post-steps: *xgenerics
post-steps: *othermods
- go/test:
name: test-golang-1.20
executor:
name: go/golang
tag: 1.20-alpine
post-steps: *othermods
- go/test:
name: test-windows
executor: windows
Expand Down
14 changes: 14 additions & 0 deletions cmd/migrate-from-testify/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module gotest.tools/cmd/migrate-from-testify

go 1.19

require (
github.com/google/go-cmp v0.5.9
golang.org/x/tools v0.10.0
gotest.tools/v3 v3.5.0
)

require (
golang.org/x/mod v0.11.0 // indirect
golang.org/x/sys v0.9.0 // indirect
)
11 changes: 11 additions & 0 deletions cmd/migrate-from-testify/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=
golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/tools v0.10.0 h1:tvDr/iQoUqNdohiYm0LmmKcBk+q86lb9EprIUFhHHGg=
golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM=
gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY=
gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"os"
"os/exec"
"testing"

"github.com/google/go-cmp/cmp"
Expand All @@ -12,14 +11,6 @@ import (
"gotest.tools/v3/golden"
)

func goGet(t *testing.T, pkg string) {
t.Log("go get", pkg)
cmd := exec.Command("go", "get", pkg)
if err := cmd.Run(); err != nil {
t.Fatal(err)
}
}

func TestRun(t *testing.T) {
setupLogging(&options{})
dir := fs.NewDir(t, "test-run",
Expand All @@ -29,12 +20,6 @@ func TestRun(t *testing.T) {
defer env.Patch(t, "GO111MODULE", "off")()
defer env.Patch(t, "GOPATH", dir.Path())()

// Fetch dependencies in GOPATH mode
// Check list in testdata/full/some_test.go
goGet(t, "gopkg.in/check.v1")
goGet(t, "github.com/stretchr/testify/assert")
goGet(t, "github.com/stretchr/testify/require")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dnephin Why did you revert e4fe373 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the idea of having to exec the go get command from inside a test. There's nothing special about this test that should require running extra commands which are going to be relatively slow and will fail when there is no network.

I'd like to understand why only the Go1.19 job is failing in CI, that's really surprising to me.

err := run(options{
pkgs: []string{"example.com/example"},
showLoaderErrors: true,
Expand Down