Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move migrate-from-testify to separate module #268

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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 @@ -19,6 +19,7 @@ func TestRun(t *testing.T) {

defer env.Patch(t, "GO111MODULE", "off")()
defer env.Patch(t, "GOPATH", dir.Path())()

err := run(options{
pkgs: []string{"example.com/example"},
showLoaderErrors: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/go-check/check"
"gopkg.in/check.v1"
"gotest.tools/v3/assert"
"gotest.tools/v3/assert/cmp"
)
Expand Down Expand Up @@ -134,9 +134,13 @@ func TestTableTest(t *testing.T) {
}
}

func TestWithChecker(c *check.C) {
type MySuite struct{}

var _ = check.Suite(&MySuite{})

func (s *MySuite) TestWithChecker(c *check.C) {
var err error
assert.Check(c, err)
c.Assert(err, check.Equals, nil)
}

func HelperWithAssertTestingT(t assert.TestingT) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"testing"

"github.com/go-check/check"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/check.v1"
)

type mystruct struct {
Expand Down Expand Up @@ -135,9 +135,13 @@ func TestTableTest(t *testing.T) {
}
}

func TestWithChecker(c *check.C) {
type MySuite struct{}

var _ = check.Suite(&MySuite{})

func (s *MySuite) TestWithChecker(c *check.C) {
var err error
assert.NoError(c, err)
c.Assert(err, check.Equals, nil)
}

func HelperWithAssertTestingT(t assert.TestingT) {
Expand Down