--- a/command/generator_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/command/generator_test.go Wed May 15 14:44:45 2019 -0500
@@ -17,105 +17,98 @@
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" -func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
func TestWithoutArgs(t *testing.T) {
- g.Expect(cmd).ToNot(BeNil())
+ assert.NotNil(t, NewGenerator()) func TestWithArgs(t *testing.T) {
- cmd := NewGenerator("a")
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a"}))
- cmd = NewGenerator("a", "b", "c")
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c"}))
+ NewGenerator("a").Command(), + NewGenerator("a", "b", "c").Command(), + []string{"a", "b", "c"}, func TestAppend(t *testing.T) {
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c"}))
+ assert.Equal(t, cmd.Command(), []string{"a", "b", "c"}) cmd = NewGenerator("a", "b")
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c"}))
+ assert.Equal(t, cmd.Command(), []string{"a", "b", "c"}) cmd.Append("b", "c", "d", "e", "f", "g", "h", "i", "j", "k")
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"}))
+ []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"}, func TestPrepend(t *testing.T) {
cmd := NewGenerator("b", "c")
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c"}))
+ assert.Equal(t, cmd.Command(), []string{"a", "b", "c"}) cmd.Prepend("a", "b", "c", "d", "e", "f", "g", "h", "i", "j")
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"}))
+ []string{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"}, func TestMultiplePrepends(t *testing.T) {
cmd := NewGenerator("u", "v", "w", "x", "y", "z")
cmd.Prepend("k", "l", "m", "n", "o", "p", "q", "r", "s", "t")
cmd.Prepend("a", "b", "c", "d", "e", "f", "g", "h", "i", "j")
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{
- "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
- "k", "l", "m", "n", "o", "p", "q", "r", "s", "t",
- "u", "v", "w", "x", "y", "z",
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", + "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", + "u", "v", "w", "x", "y", "z", func TestAppendv(t *testing.T) {
- g.Expect(NewGenerator().Command()).To(BeEquivalentTo([]string{}))
+ assert.Equal(t, NewGenerator().Command(), []string{}) cmd := NewGenerator("a", "b", "c")
cmd.Appendv([]string{"d", "e", "f"})
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c", "d", "e", "f"}))
+ assert.Equal(t, cmd.Command(), []string{"a", "b", "c", "d", "e", "f"}) func TestMixedAppend(t *testing.T) {
cmd.Appendv([]string{"b", "c"})
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c"}))
+ assert.Equal(t, cmd.Command(), []string{"a", "b", "c"}) func TestPrependv(t *testing.T) {
cmd.Prependv([]string{"a", "b"})
- g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a", "b", "c"}))
+ assert.Equal(t, cmd.Command(), []string{"a", "b", "c"}) - g.Expect(cmd.Command()).To(BeEquivalentTo([]string{"a"}))
+ assert.Equal(t, cmd.Command(), []string{"a"}) --- a/config/config_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/config/override_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/config/override_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,7 +19,7 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" "bitbucket.org/rw_grim/convey/runtime"
@@ -50,33 +50,37 @@
func TestDetermineFilenameDefault(t *testing.T) {
- g.Expect(determineFilename("convey.yml", l)).To(Equal("convey" + l.OverrideSuffix() + ".yml"))
+ determineFilename("convey.yml", l), + "convey"+l.OverrideSuffix()+".yml", func TestDetermineFilenameEmpty(t *testing.T) {
- g.Expect(determineFilename("", l)).To(Equal(l.OverrideSuffix()))
+ assert.Equal(t, determineFilename("", l), l.OverrideSuffix()) func TestDetermineFilenameCustom(t *testing.T) {
- g.Expect(determineFilename("foo.yml", l)).To(Equal("foo" + l.OverrideSuffix() + ".yml"))
+ determineFilename("foo.yml", l), + "foo"+l.OverrideSuffix()+".yml", func TestDetermineFilenameUnicodeSnowman(t *testing.T) {
- g.Expect(determineFilename("☃.yml", l)).To(Equal("☃" + l.OverrideSuffix() + ".yml"))
+ determineFilename("☃.yml", l), + "☃"+l.OverrideSuffix()+".yml", --- a/docker/build_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/build_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,35 +20,30 @@
"github.com/go-yaml/yaml"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cYaml "bitbucket.org/rw_grim/convey/yaml"
func TestBuildDockerfileRequired(t *testing.T) {
- g.Expect(b.Valid()).To(MatchError(errNoDockerFile))
+ assert.EqualError(t, b.Valid(), errNoDockerFile.Error()) func TestBuildTagRequired(t *testing.T) {
b := &Build{Dockerfile: "Dockerfile"}
- g.Expect(b.Valid()).To(MatchError(errNoTag))
+ assert.EqualError(t, b.Valid(), errNoTag.Error()) func TestBuild(t *testing.T) {
Dockerfile: "Dockerfile",
- g.Expect(b.Valid()).To(BeNil())
+ assert.Nil(t, b.Valid()) func TestBuildUnmarshalNormal(t *testing.T) {
data := `dockerfile: dockerfile
@@ -62,39 +57,32 @@
err := yaml.Unmarshal([]byte(data), &b)
- g.Expect(err).To(BeNil())
- g.Expect(b.Valid()).To(BeNil())
+ assert.Nil(t, b.Valid()) - g.Expect(b.Dockerfile).To(Equal("dockerfile"))
- g.Expect(b.Files).To(Equal(cYaml.StringOrSlice{"filename1"}))
- g.Expect(b.Tag).To(Equal("tag"))
- g.Expect(b.Labels).To(Equal(cYaml.StringOrSlice{"label1"}))
- g.Expect(b.Arguments).To(Equal(cYaml.StringOrSlice{"argument1"}))
+ assert.Equal(t, b.Dockerfile, "dockerfile") + assert.Equal(t, b.Files, cYaml.StringOrSlice{"filename1"}) + assert.Equal(t, b.Tag, "tag") + assert.Equal(t, b.Labels, cYaml.StringOrSlice{"label1"}) + assert.Equal(t, b.Arguments, cYaml.StringOrSlice{"argument1"}) func TestBuildUnmarshalMissingDockerfile(t *testing.T) {
err := yaml.Unmarshal([]byte(data), &b)
- g.Expect(err).To(BeNil())
- g.Expect(b.Valid()).To(MatchError(errNoDockerFile))
+ assert.EqualError(t, b.Valid(), errNoDockerFile.Error()) func TestBuildUnmarshalMissingTag(t *testing.T) {
data := `dockerfile: dockerfile`
err := yaml.Unmarshal([]byte(data), &b)
- g.Expect(err).To(BeNil())
- g.Expect(b.Valid()).To(MatchError(errNoTag))
+ assert.EqualError(t, b.Valid(), errNoTag.Error()) --- a/docker/docker_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/docker/environment_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/environment_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,38 +20,32 @@
"github.com/go-yaml/yaml"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cYaml "bitbucket.org/rw_grim/convey/yaml"
func TestEnvironmentSimple(t *testing.T) {
i := &Environment{Files: cYaml.StringOrSlice{"foo"}}
- g.Expect(i.Valid()).To(BeNil())
+ assert.Nil(t, i.Valid()) func TestEnvironmentFilesRequired(t *testing.T) {
- g.Expect(i.Valid()).To(MatchError(errNoFilesEnvironment))
+ assert.EqualError(t, i.Valid(), errNoFilesEnvironment.Error()) func TestEnvironmentUnmarshalString(t *testing.T) {
data := `from-files: filename`
err := yaml.Unmarshal([]byte(data), &imp)
- g.Expect(err).To(BeNil())
- g.Expect(imp.Files).To(Equal(cYaml.StringOrSlice{"filename"}))
+ assert.Equal(t, imp.Files, cYaml.StringOrSlice{"filename"}) func TestEnvironmentUnmarshalStringSlice(t *testing.T) {
@@ -59,6 +53,6 @@
err := yaml.Unmarshal([]byte(data), &imp)
- g.Expect(err).To(BeNil())
- g.Expect(imp.Files).To(Equal(cYaml.StringOrSlice{"filename1", "filename2"}))
+ assert.Equal(t, imp.Files, cYaml.StringOrSlice{"filename1", "filename2"}) --- a/docker/export_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/export_test.go Wed May 15 14:44:45 2019 -0500
@@ -16,57 +16,50 @@
- "github.com/go-yaml/yaml"
- . "github.com/onsi/gomega"
+// "github.com/go-yaml/yaml" +// "github.com/stretchr/testify/assert" - cYaml "bitbucket.org/rw_grim/convey/yaml"
+// cYaml "bitbucket.org/rw_grim/convey/yaml" -func TestExport(t *testing.T) {
- e := &Export{Files: cYaml.StringOrSlice{"foo"}}
- g.Expect(e.Valid()).To(BeNil())
+// func TestExport(t *testing.T) { +// e := &Export{Files: cYaml.StringOrSlice{"foo"}} +// assert.Nil(t, e.Valid()) -func TestExportFilesRequired(t *testing.T) {
- g.Expect(e.Valid()).To(MatchError(errNoFiles))
+// func TestExportFilesRequired(t *testing.T) { +// assert.EqualError(t, e.Valid(), errNoFiles.Error()) -func TestExportFilesDoesNotAllowWildcardWithDestination(t *testing.T) {
- Files: cYaml.StringOrSlice{"*:/foo"},
- g.Expect(e.Valid()).To(MatchError(errWildcardWithDestination))
+// func TestExportFilesDoesNotAllowWildcardWithDestination(t *testing.T) { +// Files: cYaml.StringOrSlice{"*:/foo"}, +// assert.EqualError(t, e.Valid(), errWildcardWithDestination.Error()) -func TestExportUnmarshalString(t *testing.T) {
+// func TestExportUnmarshalString(t *testing.T) { +// data := `files: filename` - data := `files: filename`
- err := yaml.Unmarshal([]byte(data), &exp)
+// err := yaml.Unmarshal([]byte(data), &exp) - g.Expect(err).To(BeNil())
- g.Expect(exp.Files).To(Equal(cYaml.StringOrSlice{"filename"}))
-func TestExportUnmarshalStringSlice(t *testing.T) {
+// assert.Equal(t, exp.Files, cYaml.StringOrSlice{"filename"})
+// func TestExportUnmarshalStringSlice(t *testing.T) {
- err := yaml.Unmarshal([]byte(data), &exp)
+// err := yaml.Unmarshal([]byte(data), &exp) - g.Expect(err).To(BeNil())
- g.Expect(exp.Files).To(Equal(cYaml.StringOrSlice{"filename1", "filename2"}))
+// assert.Equal(t, exp.Files, cYaml.StringOrSlice{"filename1", "filename2"}) --- a/docker/import_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/import_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,38 +20,32 @@
"github.com/go-yaml/yaml"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cYaml "bitbucket.org/rw_grim/convey/yaml"
func TestImport(t *testing.T) {
i := &Import{Files: cYaml.StringOrSlice{"foo"}}
- g.Expect(i.Valid()).To(BeNil())
+ assert.Nil(t, i.Valid()) func TestImportFilesRequired(t *testing.T) {
- g.Expect(i.Valid()).To(MatchError(errNoFiles))
+ assert.EqualError(t, i.Valid(), errNoFiles.Error()) func TestImportUnmarshalString(t *testing.T) {
data := `files: filename`
err := yaml.Unmarshal([]byte(data), &imp)
- g.Expect(err).To(BeNil())
- g.Expect(imp.Files).To(Equal(cYaml.StringOrSlice{"filename"}))
+ assert.Equal(t, imp.Files, cYaml.StringOrSlice{"filename"}) func TestImportUnmarshalStringSlice(t *testing.T) {
@@ -59,6 +53,6 @@
err := yaml.Unmarshal([]byte(data), &imp)
- g.Expect(err).To(BeNil())
- g.Expect(imp.Files).To(Equal(cYaml.StringOrSlice{"filename1", "filename2"}))
+ assert.Equal(t, imp.Files, cYaml.StringOrSlice{"filename1", "filename2"}) --- a/docker/login_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/login_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,34 +19,31 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestLogin(t *testing.T) {
- g.Expect(l.Valid()).To(BeNil())
+ assert.Nil(t, l.Valid()) func TestLoginServerRequired(t *testing.T) {
- g.Expect(l.Valid()).To(MatchError(errNoServer))
+ assert.EqualError(t, l.Valid(), errNoServer.Error()) func TestLoginUsernameRequired(t *testing.T) {
- g.Expect(l.Valid()).To(MatchError(errNoUsername))
+ assert.EqualError(t, l.Valid(), errNoUsername.Error()) --- a/docker/logout_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/logout_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,20 +19,19 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestLogout(t *testing.T) {
- g.Expect(l.Valid()).To(BeNil())
+ assert.Nil(t, l.Valid()) func TestLogoutServerRequired(t *testing.T) {
- g.Expect(l.Valid()).To(MatchError(errNoServer))
+ assert.EqualError(t, l.Valid(), errNoServer.Error()) --- a/docker/parser_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/parser_test.go Wed May 15 14:44:45 2019 -0500
@@ -21,29 +21,27 @@
"github.com/kballard/go-shellquote"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestECRGetLogin(t *testing.T) {
data, err := ioutil.ReadFile("data/aws-ecr-get-login.txt")
- g.Expect(err).To(BeNil())
// shell split the data from the file
argv, err := shellquote.Split(string(data))
- g.Expect(err).To(BeNil())
task, err := ParseCommand(argv)
- g.Expect(err).To(BeNil())
- g.Expect(task).To(Not(BeNil()))
// make sure we can type assert into a Login command
- g.Expect(task).To(BeAssignableToTypeOf(&Login{}))
+ assert.IsType(t, task, &Login{}) // now check the login command
- g.Expect(login.Username).To(Equal("AWS"))
- g.Expect(login.Password).To(Equal("password"))
- g.Expect(login.Server).To(Equal("https://1234567890.dkr.ecr.us-east-2.amazonaws.com"))
+ assert.Equal(t, login.Username, "AWS") + assert.Equal(t, login.Password, "password") + assert.Equal(t, login.Server, "https://1234567890.dkr.ecr.us-east-2.amazonaws.com") --- a/docker/pull_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/pull_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,45 +19,39 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cYaml "bitbucket.org/rw_grim/convey/yaml"
func TestPull(t *testing.T) {
- g.Expect(p1.Valid()).To(BeNil())
+ assert.Nil(t, p1.Valid()) Images: cYaml.StringOrSlice{"image1", "image2", "image3"},
- g.Expect(p2.Valid()).To(BeNil())
+ assert.Nil(t, p2.Valid()) func TestPullImageRequired(t *testing.T) {
- g.Expect(p1.Valid()).To(MatchError(errNoImages))
+ assert.EqualError(t, p1.Valid(), errNoImages.Error()) Images: cYaml.StringOrSlice{},
- g.Expect(p2.Valid()).To(MatchError(errNoImages))
+ assert.EqualError(t, p2.Valid(), errNoImages.Error()) func TestPullValidNormalizesImages(t *testing.T) {
Images: cYaml.StringOrSlice{"image2", "image3"},
- g.Expect(p.Valid()).To(BeNil())
- g.Expect(p.Images).To(Equal(cYaml.StringOrSlice{"image1", "image2", "image3"}))
+ assert.Nil(t, p.Valid()) + assert.Equal(t, p.Images, cYaml.StringOrSlice{"image1", "image2", "image3"}) --- a/docker/push_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/push_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,45 +19,39 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cYaml "bitbucket.org/rw_grim/convey/yaml"
func TestPush(t *testing.T) {
- g.Expect(p1.Valid()).To(BeNil())
+ assert.Nil(t, p1.Valid()) Images: cYaml.StringOrSlice{"image1", "image2", "image3"},
- g.Expect(p2.Valid()).To(BeNil())
+ assert.Nil(t, p2.Valid()) func TestPushImageRequired(t *testing.T) {
- g.Expect(p1.Valid()).To(MatchError(errNoImages))
+ assert.EqualError(t, p1.Valid(), errNoImages.Error()) Images: cYaml.StringOrSlice{},
- g.Expect(p2.Valid()).To(MatchError(errNoImages))
+ assert.EqualError(t, p2.Valid(), errNoImages.Error()) func TestPushValidNormalizesImages(t *testing.T) {
Images: cYaml.StringOrSlice{"image2", "image3"},
- g.Expect(p.Images).To(Equal(cYaml.StringOrSlice{"image1", "image2", "image3"}))
+ assert.Nil(t, p.Valid()) + assert.Equal(t, p.Images, cYaml.StringOrSlice{"image1", "image2", "image3"}) --- a/docker/remove_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/remove_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,45 +19,39 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cYaml "bitbucket.org/rw_grim/convey/yaml"
func TestRemove(t *testing.T) {
- g.Expect(p1.Valid()).To(BeNil())
+ assert.Nil(t, p1.Valid()) Images: cYaml.StringOrSlice{"image1", "image2", "image3"},
- g.Expect(p2.Valid()).To(BeNil())
+ assert.Nil(t, p2.Valid()) func TestRemoveImageRequired(t *testing.T) {
- g.Expect(p1.Valid()).To(MatchError(errNoImages))
+ assert.EqualError(t, p1.Valid(), errNoImages.Error()) Images: cYaml.StringOrSlice{},
- g.Expect(p2.Valid()).To(MatchError(errNoImages))
+ assert.EqualError(t, p2.Valid(), errNoImages.Error()) func TestRemoveValidNormalizesImages(t *testing.T) {
Images: cYaml.StringOrSlice{"image2", "image3"},
- g.Expect(p.Images).To(Equal(cYaml.StringOrSlice{"image1", "image2", "image3"}))
+ assert.Nil(t, p.Valid()) + assert.Equal(t, p.Images, cYaml.StringOrSlice{"image1", "image2", "image3"}) --- a/docker/run_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/run_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,23 +19,19 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestRun(t *testing.T) {
- g.Expect(r.Valid()).To(BeNil())
+ assert.Nil(t, r.Valid()) func TestRunImageRequired(t *testing.T) {
- g.Expect(r.Valid()).To(MatchError(errNoImage))
+ assert.EqualError(t, r.Valid(), errNoImage.Error()) --- a/docker/tag_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/tag_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,62 +19,55 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cYaml "bitbucket.org/rw_grim/convey/yaml"
func TestTag(t *testing.T) {
Destination: "destination",
- g.Expect(p1.Valid()).To(BeNil())
+ assert.Nil(t, p1.Valid()) Destinations: cYaml.StringOrSlice{"dest1", "dest2", "dest3"},
- g.Expect(p2.Valid()).To(BeNil())
+ assert.Nil(t, p2.Valid()) func TestTagSourceRequired(t *testing.T) {
Destination: "destination",
- g.Expect(tag.Valid()).To(MatchError(errNoSourceTag))
+ assert.EqualError(t, tag.Valid(), errNoSourceTag.Error()) func TestTagDestinationRequired(t *testing.T) {
- g.Expect(p1.Valid()).To(MatchError(errNoDestinationTags))
+ assert.EqualError(t, p1.Valid(), errNoDestinationTags.Error()) Destinations: cYaml.StringOrSlice{},
- g.Expect(p2.Valid()).To(MatchError(errNoDestinationTags))
+ assert.EqualError(t, p2.Valid(), errNoDestinationTags.Error()) func TestTagValidNormalizesDestinations(t *testing.T) {
Destinations: cYaml.StringOrSlice{"dest2", "dest3"},
- g.Expect(p.Destinations).To(Equal(cYaml.StringOrSlice{"dest1", "dest2", "dest3"}))
+ assert.Nil(t, p.Valid()) + assert.Equal(t, p.Destinations, cYaml.StringOrSlice{"dest1", "dest2", "dest3"}) --- a/docker/util_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/docker/util_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,7 +19,7 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" type parseImageData struct {
@@ -30,8 +30,6 @@
func TestParseImage(t *testing.T) {
data := []parseImageData{
@@ -84,8 +82,8 @@
for _, test := range data {
registry, name, tag := ParseImage(test.input)
- g.Expect(registry).To(Equal(test.registry))
- g.Expect(name).To(Equal(test.name))
- g.Expect(tag).To(Equal(test.tag))
+ assert.Equal(t, registry, test.registry) + assert.Equal(t, name, test.name) + assert.Equal(t, tag, test.tag) --- a/environment/environment_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/environment/mapper_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/environment/mapper_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,116 +20,105 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestMapperNoOSWithValue(t *testing.T) {
result, err := Mapper("${FOO}", []string{"FOO=bar"})
- g.Expect(err).To(BeNil())
- g.Expect(result).To(Equal("bar"))
+ assert.Equal(t, result, "bar") func TestMapperNoOSWithoutValue(t *testing.T) {
result, err := Mapper("${FOO}", []string{"FOO="})
- g.Expect(err).To(BeNil())
- g.Expect(result).To(Equal(""))
+ assert.Equal(t, result, "") func TestMapperMultipleEquals(t *testing.T) {
result, err := Mapper("${FOO}", []string{"FOO=bar=baz"})
- g.Expect(err).To(BeNil())
- g.Expect(result).To(Equal("bar=baz"))
+ assert.Equal(t, result, "bar=baz") func TestMapperOSWithValue(t *testing.T) {
+ defer os.Unsetenv("FOO") result, err := Mapper("${FOO}", []string{"FOO"})
- g.Expect(err).To(BeNil())
- g.Expect(result).To(Equal("bar"))
+ assert.Equal(t, result, "bar") func TestMapperOSWithoutValue(t *testing.T) {
result, err := Mapper("${FOO}", []string{"FOO"})
- g.Expect(err).To(BeNil())
- g.Expect(result).To(Equal(""))
+ assert.Equal(t, result, "") func TestMapperPartialMatches(t *testing.T) {
+ defer os.Unsetenv("FOO") + defer os.Unsetenv("BAR") result, err := Mapper("${FOO}", []string{"FOOBAR"})
- g.Expect(err).To(BeNil())
- g.Expect(result).To(Equal("${FOO}"))
+ assert.Equal(t, result, "${FOO}") result, err = Mapper("${BARBAZ}", []string{"BAR"})
- g.Expect(err).To(BeNil())
- g.Expect(result).To(Equal("${BARBAZ}"))
+ assert.Equal(t, result, "${BARBAZ}") func TestMapperRecursiveMatch(t *testing.T) {
result, err := Mapper("1${FOO}a", []string{"FOO=2${BAR}b", "BAR=3${BAZ}c", "BAZ=-ohhai!-"})
- g.Expect(err).To(BeNil())
- g.Expect(result).To(Equal("123-ohhai!-cba"))
+ assert.Equal(t, result, "123-ohhai!-cba") func TestMapperInfiniteDepthExpansion(t *testing.T) {
_, err := Mapper("${FOO}", []string{"FOO=$BAR", "BAR=$FOO"})
- g.Expect(err).To(MatchError("infinite environment mapping loop while expanding '${FOO}'"))
+ "infinite environment mapping loop while expanding '${FOO}'", func TestMapperInfiniteWidthExpansion(t *testing.T) {
_, err := Mapper("${FOO}", []string{"FOO=FOO${FOO}"})
- g.Expect(err).To(MatchError("infinite environment mapping loop while expanding '${FOO}'"))
+ "infinite environment mapping loop while expanding '${FOO}'", func TestMapperNestedCommandNotAltered(t *testing.T) {
result, err := Mapper("${FOO} $(./${BAR} $BAZ)", []string{"FOO=a", "BAR=b", "BAZ=c"})
- g.Expect(err).To(Not(BeNil()))
- g.Expect(result).To(Equal("a $(./b c)"))
+ assert.Equal(t, result, "a $(./b c)") --- a/go.mod Sat Mar 30 16:28:57 2019 -0500
+++ b/go.mod Wed May 15 14:44:45 2019 -0500
@@ -19,6 +19,6 @@
github.com/onsi/gomega v1.4.3
github.com/philopon/go-toposort v0.0.0-20170620085441-9be86dbd762f
github.com/satori/go.uuid v1.2.0
- github.com/stretchr/testify v1.3.0 // indirect
+ github.com/stretchr/testify v1.3.0 golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c
--- a/kubectl/apply_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/kubectl/apply_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,15 +19,13 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestApplyFilesRequired(t *testing.T) {
- g.Expect(a.Valid()).To(Not(BeNil()))
+ assert.NotNil(t, a.Valid()) a = &Apply{Files: []string{"foo.yml"}}
- g.Expect(a.Valid()).To(BeNil())
+ assert.Nil(t, a.Valid()) --- a/kubectl/create_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/kubectl/create_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,15 +19,13 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestCreateFilesRequired(t *testing.T) {
- g.Expect(c.Valid()).To(Not(BeNil()))
+ assert.NotNil(t, c.Valid()) c = &Create{Files: []string{"foo.yml"}}
- g.Expect(c.Valid()).To(BeNil())
+ assert.Nil(t, c.Valid()) --- a/kubectl/delete_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/kubectl/delete_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,15 +19,13 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestFilesRequired(t *testing.T) {
- g.Expect(d.Valid()).To(Not(BeNil()))
+ assert.NotNil(t, d.Valid()) d = &Delete{Files: []string{"foo.yml"}}
- g.Expect(d.Valid()).To(BeNil())
+ assert.Nil(t, d.Valid()) --- a/kubectl/kubectl_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/loaders/bitbucket/bitbucket_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/loaders/bitbucket/loader_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/loaders/bitbucket/loader_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,7 +20,7 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" "bitbucket.org/rw_grim/convey/config"
"bitbucket.org/rw_grim/convey/docker"
@@ -30,16 +30,14 @@
func TestLoaderSimple(t *testing.T) {
data, err := ioutil.ReadFile("data/simple.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -76,20 +74,18 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) func TestLoaderComplexGlobalImage(t *testing.T) {
data, err := ioutil.ReadFile("data/complex-global-image.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -126,20 +122,18 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) func TestLoaderComplexGlobalImageWithLogin(t *testing.T) {
data, err := ioutil.ReadFile("data/complex-global-image-with-login.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -184,20 +178,18 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) func TestLoaderComplexStepSimpleImage(t *testing.T) {
data, err := ioutil.ReadFile("data/complex-step-simple-image.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -234,20 +226,18 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) func TestLoaderComplexStepImage(t *testing.T) {
data, err := ioutil.ReadFile("data/complex-step-image.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -284,20 +274,18 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) func TestLoaderComplexStepImageWithLogin(t *testing.T) {
data, err := ioutil.ReadFile("data/complex-step-image-with-login.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -342,36 +330,32 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) func TestLoaderBranchNoImage(t *testing.T) {
data, err := ioutil.ReadFile("data/branch-no-image.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(err).To(Not(BeNil()))
func TestLoaderBranchImage(t *testing.T) {
data, err := ioutil.ReadFile("data/branch-image.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -403,20 +387,18 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) func TestLoaderDockerMixed(t *testing.T) {
data, err := ioutil.ReadFile("data/docker-mixed.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -477,20 +459,18 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) func TestLoaderDockerSimple(t *testing.T) {
data, err := ioutil.ReadFile("data/docker-simple.yml")
- g.Expect(err).To(BeNil())
cfg, err := l.Load("", "", data, []string{}, true)
- g.Expect(err).To(BeNil())
expected := &config.Config{
Tasks: map[string]tasks.Task{
@@ -530,5 +510,5 @@
- g.Expect(cfg).To(Equal(expected))
+ assert.Equal(t, cfg, expected) --- a/loaders/bitbucket/unmarshal_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/loaders/bitbucket/unmarshal_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,12 +20,10 @@
"github.com/go-yaml/yaml"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestUnmarshalSimple(t *testing.T) {
yamlData := `image: python:3
@@ -41,7 +39,7 @@
var actual bitbucketPipelines
err := yaml.Unmarshal([]byte(yamlData), &actual)
- g.Expect(err).To(BeNil())
expected := bitbucketPipelines{
@@ -64,12 +62,11 @@
- g.Expect(actual).To(Equal(expected))
+ assert.Equal(t, actual, expected) func TestUnmarshalMultipleBranches(t *testing.T) {
yamlData := `image: pidgin/builder-debian:stretch
@@ -93,7 +90,7 @@
var actual bitbucketPipelines
err := yaml.Unmarshal([]byte(yamlData), &actual)
- g.Expect(err).To(BeNil())
expected := bitbucketPipelines{
@@ -132,12 +129,11 @@
- g.Expect(actual).To(Equal(expected))
+ assert.Equal(t, actual, expected) func TestUnmarshalWithDocker(t *testing.T) {
@@ -152,7 +148,7 @@
var actual bitbucketPipelines
err := yaml.Unmarshal([]byte(yamlData), &actual)
- g.Expect(err).To(BeNil())
expected := bitbucketPipelines{
@@ -172,12 +168,11 @@
- g.Expect(actual).To(Equal(expected))
+ assert.Equal(t, actual, expected) func TestUnmarshalComplexGlobalImage(t *testing.T) {
@@ -190,7 +185,7 @@
var actual bitbucketPipelines
err := yaml.Unmarshal([]byte(yamlData), &actual)
- g.Expect(err).To(BeNil())
expected := bitbucketPipelines{
@@ -208,12 +203,11 @@
- g.Expect(actual).To(Equal(expected))
+ assert.Equal(t, actual, expected) func TestUnmarshalComplexStepImage(t *testing.T) {
@@ -229,7 +223,7 @@
var actual bitbucketPipelines
err := yaml.Unmarshal([]byte(yamlData), &actual)
- g.Expect(err).To(BeNil())
expected := bitbucketPipelines{
@@ -250,5 +244,6 @@
- g.Expect(actual).To(Equal(expected))
+ assert.Equal(t, actual, expected) --- a/loaders/codebuild/codebuild_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/loaders/codebuild/unmarshal_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/loaders/codebuild/unmarshal_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,12 +20,10 @@
"github.com/go-yaml/yaml"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestUnmarshalSimple(t *testing.T) {
yamlData := `version: 0.2
@@ -55,7 +53,7 @@
err := yaml.Unmarshal([]byte(yamlData), &actual)
- g.Expect(err).To(BeNil())
@@ -99,5 +97,5 @@
- g.Expect(actual).To(Equal(expected))
+ assert.Equal(t, actual, expected) --- a/loaders/convey/convey_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/loaders/convey/convey_test.go Wed May 15 14:44:45 2019 -0500
@@ -17,36 +17,24 @@
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" realConfig "bitbucket.org/rw_grim/convey/config"
"bitbucket.org/rw_grim/convey/runtime"
"bitbucket.org/rw_grim/convey/state"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
/* OverrideSuffix tests */
func TestOverrideSuffix(t *testing.T) {
- g.Expect(l.OverrideSuffix()).To(Equal("-override"))
+ assert.Equal(t, l.OverrideSuffix(), "-override") /* ResolvePlanName tests */
func TestResolvePlanName(t *testing.T) {
cfg := &realConfig.Config{}
rt := runtime.New(&state.State{})
@@ -58,14 +46,12 @@
for _, name := range tests {
- g.Expect(l.ResolvePlanName(name, cfg, rt)).To(Equal(name))
+ assert.Equal(t, l.ResolvePlanName(name, cfg, rt), name) /* required fields tests */
func TestTasksRequired(t *testing.T) {
@@ -74,12 +60,10 @@
_, err := l.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(MatchError(ErrNoTasks))
+ assert.EqualError(t, err, ErrNoTasks.Error()) func TestPlansRequired(t *testing.T) {
@@ -89,5 +73,5 @@
_, err := l.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(MatchError(ErrNoPlans))
+ assert.EqualError(t, err, ErrNoPlans.Error()) --- a/loaders/convey/default_plan_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/loaders/convey/default_plan_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,30 +19,24 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestDefaultPlan(t *testing.T) {
- g.Expect(l.DefaultPlan()).To(Equal("default"))
+ assert.Equal(t, l.DefaultPlan(), "default") func TestDefaultPlanSet(t *testing.T) {
defaultPlan: "something else",
- g.Expect(l.DefaultPlan()).To(Equal("something else"))
+ assert.Equal(t, l.DefaultPlan(), "something else") func TestDefaultPlanFromConfig(t *testing.T) {
default-plan: overridden-plan
@@ -59,14 +53,12 @@
cfg, err := l.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(l.defaultPlan).To(Equal("overridden-plan"))
- g.Expect(cfg).To(Not(BeNil()))
+ assert.Equal(t, l.defaultPlan, "overridden-plan") func TestDefaultPlanFromOverride(t *testing.T) {
@@ -81,8 +73,8 @@
cfg, err := l.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(l.defaultPlan).To(Equal(""))
+ assert.Equal(t, l.defaultPlan, "") @@ -90,5 +82,6 @@
l.LoadOverride(".", ".", []byte(overrideData), cfg, true)
- g.Expect(l.DefaultPlan()).To(Equal("abcxyz"))
+ assert.Equal(t, l.DefaultPlan(), "abcxyz") --- a/loaders/convey/environment_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/loaders/convey/environment_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,7 +19,7 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" @@ -38,8 +38,6 @@
func TestEnvironmentUnmarshalGlobalSlice(t *testing.T) {
@@ -48,31 +46,27 @@
cfg, err := loader.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Environment).To(ConsistOf([]string{"foo=bar", "baz"}))
+ assert.ElementsMatch(t, cfg.Environment, []string{"foo=bar", "baz"}) func TestEnvironmentUnmarshalGlobalString(t *testing.T) {
data := `environment: foo=bar
cfg, err := loader.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Environment).To(Equal([]string{"foo=bar"}))
+ assert.Equal(t, cfg.Environment, []string{"foo=bar"}) func TestEnvironmentUnmarshalGlobalOverrideSlice(t *testing.T) {
cfg, err := loader.Load(".", ".", []byte(baseData), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Environment).To(BeEmpty())
+ assert.Empty(t, cfg.Environment) @@ -81,22 +75,20 @@
loader.LoadOverride(".", ".", []byte(overrideData), cfg, true)
- g.Expect(cfg.Environment).To(ConsistOf([]string{"foo=bar", "baz"}))
+ assert.ElementsMatch(t, cfg.Environment, []string{"foo=bar", "baz"}) func TestEnvironmentUnmarshalGlobalOverrideString(t *testing.T) {
cfg, err := loader.Load(".", ".", []byte(baseData), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Environment).To(BeEmpty())
+ assert.Empty(t, cfg.Environment) loader.LoadOverride(".", ".", []byte(overrideData), cfg, true)
- g.Expect(cfg.Environment).To(Equal([]string{"foo=bar"}))
+ assert.Equal(t, cfg.Environment, []string{"foo=bar"}) --- a/loaders/convey/extend_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/loaders/convey/extend_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,7 +19,7 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cConfig "bitbucket.org/rw_grim/convey/config"
"bitbucket.org/rw_grim/convey/tasks"
@@ -28,8 +28,6 @@
func TestExtendSimple(t *testing.T) {
@@ -52,17 +50,14 @@
cfg, err := loader.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Tasks).To(HaveLen(2))
- g.Expect(cfg.Tasks).To(HaveKey("a"))
- g.Expect(cfg.Tasks).To(HaveKey("b"))
- g.Expect(cfg.Tasks["b"].(*tasks.Extend).InnerTask).NotTo(BeIdenticalTo(cfg.Tasks["a"]))
- g.Expect(cfg.Tasks["b"].(*tasks.Extend).InnerTask).To(BeEquivalentTo(cfg.Tasks["a"]))
+ assert.Len(t, cfg.Tasks, 2) + assert.Contains(t, cfg.Tasks, "a") + assert.Contains(t, cfg.Tasks, "b") + assert.Exactly(t, cfg.Tasks["b"].(*tasks.Extend).InnerTask, cfg.Tasks["a"]) func TestExtendChain(t *testing.T) {
@@ -90,22 +85,29 @@
cfg, err := loader.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Tasks).To(HaveLen(3))
- g.Expect(cfg.Tasks).To(HaveKey("a"))
- g.Expect(cfg.Tasks).To(HaveKey("b"))
- g.Expect(cfg.Tasks).To(HaveKey("c"))
- g.Expect(cfg.Tasks["c"].(*tasks.Extend).InnerTask).NotTo(BeIdenticalTo(cfg.Tasks["b"]))
- g.Expect(cfg.Tasks["c"].(*tasks.Extend).InnerTask).To(BeEquivalentTo(cfg.Tasks["b"]))
- g.Expect(cfg.Tasks["b"].(*tasks.Extend).InnerTask).NotTo(BeIdenticalTo(cfg.Tasks["a"]))
- g.Expect(cfg.Tasks["b"].(*tasks.Extend).InnerTask).To(BeEquivalentTo(cfg.Tasks["a"]))
- g.Expect(cfg.Tasks["c"].(*tasks.Extend).InnerTask.(*tasks.Extend).InnerTask).NotTo(BeIdenticalTo(cfg.Tasks["a"]))
- g.Expect(cfg.Tasks["c"].(*tasks.Extend).InnerTask.(*tasks.Extend).InnerTask).To(BeEquivalentTo(cfg.Tasks["a"]))
+ assert.Len(t, cfg.Tasks, 3) + assert.Contains(t, cfg.Tasks, "a") + assert.Contains(t, cfg.Tasks, "b") + assert.Contains(t, cfg.Tasks, "c") + cfg.Tasks["c"].(*tasks.Extend).InnerTask, + cfg.Tasks["b"].(*tasks.Extend).InnerTask, + cfg.Tasks["c"].(*tasks.Extend).InnerTask.(*tasks.Extend).InnerTask, func TestExtendCycle(t *testing.T) {
@@ -122,12 +124,15 @@
_, err := loader.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(MatchError("The following tasks are part of a dependency cycle: a, b"))
+ "The following tasks are part of a dependency cycle: a, b", func TestExtendMissingTask(t *testing.T) {
@@ -141,12 +146,11 @@
_, err := loader.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(err).To(MatchError("b: Extending undeclared task 'a'"))
+ assert.EqualError(t, err, "b: Extending undeclared task 'a'") func TestExtendExtends(t *testing.T) {
@@ -182,19 +186,18 @@
cfg, err := loader.Load(".", ".", []byte(extendedData), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Tasks).To(HaveLen(2))
- g.Expect(cfg.Tasks).To(HaveKey("foo"))
- g.Expect(cfg.Tasks).To(HaveKey("bar"))
- g.Expect(cfg.Tasks).To(HaveKey("foo"))
- g.Expect(cfg.Tasks).To(HaveKey("bar"))
- g.Expect(cfg.Tasks["bar"].(*tasks.Extend).InnerTask).NotTo(BeIdenticalTo(cfg.Tasks["foo"]))
- g.Expect(cfg.Tasks["bar"].(*tasks.Extend).InnerTask).To(BeEquivalentTo(cfg.Tasks["foo"]))
+ assert.Len(t, cfg.Tasks, 2) + assert.Contains(t, cfg.Tasks, "foo") + assert.Contains(t, cfg.Tasks, "bar") + cfg.Tasks["bar"].(*tasks.Extend).InnerTask, func TestReplaceStage(t *testing.T) {
@@ -273,30 +276,45 @@
cfg, err := loader.Load(".", ".", []byte(data3), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Plans).To(HaveLen(2))
- g.Expect(cfg.Plans).To(HaveKey("plan1"))
- g.Expect(cfg.Plans).To(HaveKey("plan2"))
+ assert.Len(t, cfg.Plans, 2) + assert.Contains(t, cfg.Plans, "plan1") + assert.Contains(t, cfg.Plans, "plan2") - g.Expect(cfg.Plans["plan1"].Stages).To(HaveLen(3))
- g.Expect(cfg.Plans["plan1"].Stages[0].Name).To(Equal("pre"))
- g.Expect(cfg.Plans["plan1"].Stages[1].Name).To(Equal("real-work"))
- g.Expect(cfg.Plans["plan1"].Stages[2].Name).To(Equal("post"))
- g.Expect(cfg.Plans["plan1"].Stages[0].Tasks).To(HaveLen(1))
- g.Expect(cfg.Plans["plan1"].Stages[1].Tasks).To(HaveLen(1))
- g.Expect(cfg.Plans["plan1"].Stages[2].Tasks).To(HaveLen(1))
- g.Expect(cfg.Plans["plan1"].Stages[0].Tasks).To(ConsistOf("pre"))
- g.Expect(cfg.Plans["plan1"].Stages[1].Tasks).To(ConsistOf("bar"))
- g.Expect(cfg.Plans["plan1"].Stages[2].Tasks).To(ConsistOf("baz"))
+ assert.Len(t, cfg.Plans["plan1"].Stages, 3) + assert.Equal(t, cfg.Plans["plan1"].Stages[0].Name, "pre") + assert.Equal(t, cfg.Plans["plan1"].Stages[1].Name, "real-work") + assert.Equal(t, cfg.Plans["plan1"].Stages[2].Name, "post") + assert.Len(t, cfg.Plans["plan1"].Stages[0].Tasks, 1) + assert.Len(t, cfg.Plans["plan1"].Stages[1].Tasks, 1) + assert.Len(t, cfg.Plans["plan1"].Stages[2].Tasks, 1) + cfg.Plans["plan1"].Stages[0].Tasks, + cfg.Plans["plan1"].Stages[1].Tasks, + cfg.Plans["plan1"].Stages[2].Tasks, - g.Expect(cfg.Plans["plan2"].Stages).To(HaveLen(1))
- g.Expect(cfg.Plans["plan2"].Stages[0].Tasks).To(HaveLen(1))
- g.Expect(cfg.Plans["plan2"].Stages[0].Tasks).To(ConsistOf("bar"))
+ assert.Len(t, cfg.Plans["plan2"].Stages, 1) + assert.Len(t, cfg.Plans["plan2"].Stages[0].Tasks, 1) + cfg.Plans["plan2"].Stages[0].Tasks, func TestMergeMissingPlan(t *testing.T) {
@@ -328,12 +346,11 @@
_, err := loader.Load(".", ".", []byte(data2), []string{}, true)
- g.Expect(err).To(MatchError("cannot merge with unknown plan 'plan2'"))
+ assert.EqualError(t, err, "cannot merge with unknown plan 'plan2'") func TestMergeMissingStage(t *testing.T) {
@@ -369,12 +386,15 @@
_, err := loader.Load(".", ".", []byte(data2), []string{}, true)
- g.Expect(err).To(MatchError("cannot overwrite stage 'missing' in plan 'plan1' (no such stage in parent)"))
+ "cannot overwrite stage 'missing' in plan 'plan1' (no such stage in parent)", func TestMergePlanEnvironment(t *testing.T) {
@@ -407,7 +427,16 @@
cfg, err := loader.Load(".", ".", []byte(data2), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Plans["plan1"].Stages[0].Tasks).To(ConsistOf("foo"))
- g.Expect(cfg.Plans["plan1"].Environment).To(ConsistOf("FOO=BAR", "BAR=BONK"))
+ cfg.Plans["plan1"].Stages[0].Tasks, + cfg.Plans["plan1"].Environment, + []string{"FOO=BAR", "BAR=BONK"}, --- a/loaders/convey/extends_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/loaders/convey/extends_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,17 +20,13 @@
- "bitbucket.org/rw_grim/convey/docker"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cConfig "bitbucket.org/rw_grim/convey/config"
+ "bitbucket.org/rw_grim/convey/docker" -// This test suite tests
func TestExtendNoClash(t *testing.T) {
@@ -74,21 +70,24 @@
cfg, err := loader.Load(".", ".", []byte(extendedData), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Environment).To(ConsistOf([]string{"x=1", "y=2", "z=3", "w=4"}))
- g.Expect(cfg.Tasks).To(HaveLen(4))
- g.Expect(cfg.Tasks).To(HaveKey("foo"))
- g.Expect(cfg.Tasks).To(HaveKey("bar"))
- g.Expect(cfg.Tasks).To(HaveKey("baz"))
- g.Expect(cfg.Tasks).To(HaveKey("bonk"))
- g.Expect(cfg.Plans).To(HaveLen(2))
- g.Expect(cfg.Plans).To(HaveKey("plan1"))
- g.Expect(cfg.Plans).To(HaveKey("plan2"))
+ assert.Len(t, cfg.Plans, 2) + assert.Contains(t, cfg.Plans, "plan1") + assert.Contains(t, cfg.Plans, "plan2") + []string{"x=1", "y=2", "z=3", "w=4"}, + assert.Len(t, cfg.Tasks, 4) + assert.Contains(t, cfg.Tasks, "foo") + assert.Contains(t, cfg.Tasks, "bar") + assert.Contains(t, cfg.Tasks, "baz") + assert.Contains(t, cfg.Tasks, "bonk") func TestExtendExtendsAndOverwrite(t *testing.T) {
@@ -132,22 +131,26 @@
cfg, err := loader.Load(".", ".", []byte(extendedData), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Environment).To(ConsistOf([]string{"x=1", "y=2", "z=4"}))
- g.Expect(cfg.Tasks).To(HaveLen(3))
- g.Expect(cfg.Tasks).To(HaveKey("foo"))
- g.Expect(cfg.Tasks).To(HaveKey("bar"))
- g.Expect(cfg.Tasks).To(HaveKey("baz"))
- g.Expect(cfg.Plans).To(HaveLen(1))
- g.Expect(cfg.Plans).To(HaveKey("plan1"))
+ assert.ElementsMatch(t, cfg.Environment, []string{"x=1", "y=2", "z=4"}) + assert.Len(t, cfg.Plans, 1) + assert.Contains(t, cfg.Plans, "plan1") - g.Expect(cfg.Tasks["baz"].(*docker.Run).Image).To(Equal("imaginary4"))
- g.Expect(cfg.Plans["plan1"].Stages[0].Tasks).To(BeEquivalentTo([]string{"foo", "baz"}))
+ assert.Len(t, cfg.Tasks, 3) + assert.Contains(t, cfg.Tasks, "foo") + assert.Contains(t, cfg.Tasks, "bar") + assert.Contains(t, cfg.Tasks, "baz") + assert.Equal(t, cfg.Tasks["baz"].(*docker.Run).Image, "imaginary4") + cfg.Plans["plan1"].Stages[0].Tasks, + []string{"foo", "baz"}, func TestExtendExtendDefault(t *testing.T) {
@@ -182,13 +185,12 @@
_, err := loader.Load(".", ".", []byte(extendedData), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(loader.defaultPlan).To(Equal("plan2"))
+ assert.Equal(t, loader.defaultPlan, "plan2") func TestExtendExtendTasksOnly(t *testing.T) {
@@ -213,16 +215,17 @@
cfg, err := loader.Load(".", ".", []byte(extendedData), []string{}, true)
- g.Expect(err).To(BeNil())
- g.Expect(cfg.Tasks).To(HaveLen(1))
- g.Expect(cfg.Tasks).To(HaveKey("foo"))
- g.Expect(cfg.Plans).To(HaveLen(1))
- g.Expect(cfg.Plans).To(HaveKey("plan"))
+ assert.Len(t, cfg.Plans, 1) + assert.Contains(t, cfg.Plans, "plan") + assert.Len(t, cfg.Tasks, 1) + assert.Contains(t, cfg.Tasks, "foo") func TestExtendExtendNoTasks(t *testing.T) {
extendedData := `extends: base.yml`
@@ -233,12 +236,11 @@
_, err := loader.Load(".", ".", []byte(extendedData), []string{}, true)
- g.Expect(err).To(Equal(ErrNoTasks))
+ assert.EqualError(t, err, ErrNoTasks.Error()) func TestExtendExtendNoPlans(t *testing.T) {
@@ -257,14 +259,13 @@
cfg, err := loader.Load(".", ".", []byte(extendedData), []string{}, true)
- g.Expect(err).To(Equal(ErrNoPlans))
- g.Expect(cfg.Tasks).To(HaveLen(1))
- g.Expect(cfg.Tasks).To(HaveKey("foo"))
+ assert.EqualError(t, err, ErrNoPlans.Error()) + assert.Len(t, cfg.Tasks, 1) + assert.Contains(t, cfg.Tasks, "foo") func TestExtendLoop(t *testing.T) {
@@ -276,12 +277,11 @@
_, err := loader.Load(".", ".", []byte(sameData), []string{}, true)
- g.Expect(err).To(Equal(ErrMaxExtendsDepth))
+ assert.EqualError(t, err, ErrMaxExtendsDepth.Error()) func TestExtendFilename(t *testing.T) {
@@ -296,5 +296,6 @@
loader.Load(".", ".", []byte(data), []string{}, true)
- g.Expect(calledWith).To(Equal("../base.yaml"))
+ assert.Equal(t, calledWith, "../base.yaml") --- a/normalize/normalize_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/normalize/normalize_test.go Wed May 15 14:44:45 2019 -0500
@@ -17,24 +17,14 @@
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" -func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
func simpleTest(t *testing.T, tests map[string]string) {
for in, out := range tests {
- g.Expect(Normalize(in)).To(Equal(out))
+ assert.Equal(t, Normalize(in), out) --- a/path/path_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/path/path_test.go Wed May 15 14:44:45 2019 -0500
@@ -17,22 +17,12 @@
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" -func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
func TestParseFilePath(t *testing.T) {
type data struct{ src, dest string }
tests := map[string]data{
@@ -49,14 +39,12 @@
for in, exp := range tests {
src, dest := ParseFilePath("", in)
- g.Expect(src).To(Equal(exp.src))
- g.Expect(dest).To(Equal(exp.dest))
+ assert.Equal(t, src, exp.src) + assert.Equal(t, dest, exp.dest) func TestParseFilePathWithBase(t *testing.T) {
type data struct{ src, dest string }
tests := map[string]data{
@@ -68,7 +56,7 @@
for in, exp := range tests {
src, dest := ParseFilePath("fedora", in)
- g.Expect(src).To(Equal(exp.src))
- g.Expect(dest).To(Equal(exp.dest))
+ assert.Equal(t, src, exp.src) + assert.Equal(t, dest, exp.dest) --- a/path/traverse_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/path/traverse_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,12 +20,10 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestTraversed(t *testing.T) {
tests := map[string]bool{
@@ -35,25 +33,23 @@
- g.Expect(err).To(BeNil())
for path, res := range tests {
_, err := TraversesNonExistent(wd, path)
- g.Expect(err).ToNot(BeNil())
- g.Expect(err).To(BeNil())
func TestDot(t *testing.T) {
- g.Expect(err).To(BeNil())
path, err := Traverses(wd, ".")
- g.Expect(path).To(Equal(wd))
- g.Expect(err).To(BeNil())
+ assert.Equal(t, path, wd) --- a/plans/plans_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/plans/plans_test.go Wed May 15 14:44:45 2019 -0500
@@ -17,25 +17,15 @@
"github.com/go-yaml/yaml"
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" cYaml "bitbucket.org/rw_grim/convey/yaml"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
func TestEnvironmentSlice(t *testing.T) {
@@ -44,48 +34,41 @@
err := yaml.Unmarshal([]byte(data), &p)
- g.Expect(err).To(BeNil())
- g.Expect(p.Environment).To(Equal(cYaml.StringOrSlice{"foo=bar", "baz"}))
+ assert.Equal(t, p.Environment, cYaml.StringOrSlice{"foo=bar", "baz"}) func TestEnvironmentString(t *testing.T) {
data := `environment: foo=bar
err := yaml.Unmarshal([]byte(data), &p)
- g.Expect(err).To(BeNil())
- g.Expect(p.Environment).To(Equal(cYaml.StringOrSlice{"foo=bar"}))
+ assert.Equal(t, p.Environment, cYaml.StringOrSlice{"foo=bar"}) func TestStagesRequired(t *testing.T) {
err := yaml.Unmarshal([]byte(data), &p)
- g.Expect(err).To(BeNil())
- g.Expect(err).To(Equal(ErrNoStages))
- g.Expect(len(p.Stages)).To(Equal(0))
+ assert.EqualError(t, err, ErrNoStages.Error()) + assert.Len(t, p.Stages, 0) func TestValid(t *testing.T) {
err := yaml.Unmarshal([]byte(data), &p)
- g.Expect(err).To(BeNil())
- g.Expect(err).To(BeNil())
+ assert.Nil(t, p.Valid()) --- a/runtime/containers_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/runtime/containers_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,39 +19,35 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestContainersRunning(t *testing.T) {
containers := NewContainers()
- g.Expect(containers.GetRunning()).To(BeEmpty())
+ assert.Empty(t, containers.GetRunning()) containers.MarkRunning("foo")
- g.Expect(containers.GetRunning()).To(HaveLen(1))
- g.Expect(containers.GetRunning()).To(ConsistOf([]string{"foo"}))
+ assert.Len(t, containers.GetRunning(), 1) + assert.ElementsMatch(t, containers.GetRunning(), []string{"foo"}) containers.MarkRunning("bar")
- g.Expect(containers.GetRunning()).To(HaveLen(2))
- g.Expect(containers.GetRunning()).To(ConsistOf([]string{"foo", "bar"}))
+ assert.Len(t, containers.GetRunning(), 2) + assert.ElementsMatch(t, containers.GetRunning(), []string{"foo", "bar"}) containers.UnmarkRunning("bar")
- g.Expect(containers.GetRunning()).To(HaveLen(1))
- g.Expect(containers.GetRunning()).To(ConsistOf([]string{"foo"}))
+ assert.Len(t, containers.GetRunning(), 1) + assert.ElementsMatch(t, containers.GetRunning(), []string{"foo"}) func TestContainersDetached(t *testing.T) {
containers := NewContainers()
- g.Expect(containers.GetDetached()).To(BeEmpty())
+ assert.Empty(t, containers.GetDetached()) containers.MarkDetached("foo")
- g.Expect(containers.GetDetached()).To(HaveLen(1))
- g.Expect(containers.GetDetached()).To(ConsistOf([]string{"foo"}))
+ assert.Len(t, containers.GetDetached(), 1) + assert.ElementsMatch(t, containers.GetDetached(), []string{"foo"}) containers.MarkDetached("bar")
- g.Expect(containers.GetDetached()).To(HaveLen(2))
- g.Expect(containers.GetDetached()).To(ConsistOf([]string{"foo", "bar"}))
+ assert.Len(t, containers.GetDetached(), 2) + assert.ElementsMatch(t, containers.GetDetached(), []string{"foo", "bar"}) --- a/runtime/runtime_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/script/script_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/script/script_test.go Wed May 15 14:44:45 2019 -0500
@@ -17,35 +17,23 @@
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" "bitbucket.org/rw_grim/convey/aws"
"bitbucket.org/rw_grim/convey/docker"
- "bitbucket.org/rw_grim/convey/tasks"
+ cYaml "bitbucket.org/rw_grim/convey/yaml" -func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
func TestEmpty(t *testing.T) {
parsedTasks, err := Parse("", "", []string{})
- g.Expect(err).To(BeNil())
- g.Expect(parsedTasks).To(BeEquivalentTo([]tasks.Task{}))
+ assert.Empty(t, parsedTasks) func TestSimple(t *testing.T) {
@@ -53,45 +41,41 @@
parsedTasks, err := Parse("", "", commands)
- g.Expect(err).To(BeNil())
- g.Expect(len(parsedTasks)).To(Equal(1))
+ assert.Len(t, parsedTasks, 1) - g.Expect(parsedTasks[0]).To(BeAssignableToTypeOf(&docker.Run{}))
+ assert.IsType(t, parsedTasks[0], &docker.Run{}) func TestSubShellUnknown(t *testing.T) {
commands := []string{"$(true)"}
parsedTasks, err := Parse("", "", commands)
- g.Expect(err).To(BeNil())
- g.Expect(len(parsedTasks)).To(Equal(1))
+ assert.Len(t, parsedTasks, 1) - g.Expect(parsedTasks[0]).To(BeAssignableToTypeOf(&docker.Run{}))
+ assert.IsType(t, parsedTasks[0], &docker.Run{}) run := parsedTasks[0].(*docker.Run)
- g.Expect(run.Script).To(BeEquivalentTo([]string{"$(true)"}))
+ assert.Equal(t, run.Script, cYaml.StringOrSlice([]string{"$(true)"})) func TestBackTicksUnknown(t *testing.T) {
commands := []string{"`true`"}
parsedTasks, err := Parse("", "", commands)
- g.Expect(err).To(BeNil())
- g.Expect(len(parsedTasks)).To(Equal(1))
+ assert.Len(t, parsedTasks, 1) - g.Expect(parsedTasks[0]).To(BeAssignableToTypeOf(&docker.Run{}))
+ assert.IsType(t, parsedTasks[0], &docker.Run{}) run := parsedTasks[0].(*docker.Run)
- g.Expect(run.Script).To(BeEquivalentTo([]string{"`true`"}))
+ assert.Equal(t, run.Script, cYaml.StringOrSlice([]string{"`true`"})) func TestDockerThenScript(t *testing.T) {
@@ -99,16 +83,14 @@
parsedTasks, err := Parse("", "", commands)
- g.Expect(err).To(BeNil())
- g.Expect(len(parsedTasks)).To(Equal(2))
+ assert.Len(t, parsedTasks, 2) - g.Expect(parsedTasks[0]).To(BeAssignableToTypeOf(&docker.Push{}))
- g.Expect(parsedTasks[1]).To(BeAssignableToTypeOf(&docker.Run{}))
+ assert.IsType(t, parsedTasks[0], &docker.Push{}) + assert.IsType(t, parsedTasks[1], &docker.Run{}) func TestScriptThenDocker(t *testing.T) {
@@ -116,16 +98,14 @@
parsedTasks, err := Parse("", "", commands)
- g.Expect(err).To(BeNil())
- g.Expect(len(parsedTasks)).To(Equal(2))
+ assert.Len(t, parsedTasks, 2) - g.Expect(parsedTasks[0]).To(BeAssignableToTypeOf(&docker.Run{}))
- g.Expect(parsedTasks[1]).To(BeAssignableToTypeOf(&docker.Push{}))
+ assert.IsType(t, parsedTasks[0], &docker.Run{}) + assert.IsType(t, parsedTasks[1], &docker.Push{}) func TestMixed(t *testing.T) {
@@ -134,17 +114,15 @@
parsedTasks, err := Parse("", "", commands)
- g.Expect(err).To(BeNil())
- g.Expect(len(parsedTasks)).To(Equal(3))
+ assert.Len(t, parsedTasks, 3) - g.Expect(parsedTasks[0]).To(BeAssignableToTypeOf(&docker.Run{}))
- g.Expect(parsedTasks[1]).To(BeAssignableToTypeOf(&docker.Push{}))
- g.Expect(parsedTasks[2]).To(BeAssignableToTypeOf(&docker.Run{}))
+ assert.IsType(t, parsedTasks[0], &docker.Run{}) + assert.IsType(t, parsedTasks[1], &docker.Push{}) + assert.IsType(t, parsedTasks[2], &docker.Run{}) func TestAWSECRGetLogin(t *testing.T) {
"aws ecr get-login --region us-west-2",
@@ -154,11 +132,11 @@
parsedTasks, err := Parse("", "", commands)
- g.Expect(err).To(BeNil())
- g.Expect(len(parsedTasks)).To(Equal(4))
+ assert.Len(t, parsedTasks, 4) - g.Expect(parsedTasks[0]).To(BeAssignableToTypeOf(&aws.ECRGetLogin{}))
- g.Expect(parsedTasks[1]).To(BeAssignableToTypeOf(&aws.ECRGetLogin{}))
- g.Expect(parsedTasks[2]).To(BeAssignableToTypeOf(&aws.ECRGetLogin{}))
- g.Expect(parsedTasks[3]).To(BeAssignableToTypeOf(&aws.ECRGetLogin{}))
+ assert.IsType(t, parsedTasks[0], &aws.ECRGetLogin{}) + assert.IsType(t, parsedTasks[1], &aws.ECRGetLogin{}) + assert.IsType(t, parsedTasks[2], &aws.ECRGetLogin{}) + assert.IsType(t, parsedTasks[3], &aws.ECRGetLogin{}) --- a/ssh/agent_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/ssh/agent_test.go Wed May 15 14:44:45 2019 -0500
@@ -23,7 +23,7 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" "golang.org/x/crypto/ssh"
"golang.org/x/crypto/ssh/agent"
@@ -63,32 +63,26 @@
func TestKeysAvailableEmpty(t *testing.T) {
avail, err := keysAvailable(
setupAgent([]agent.AddedKey{}),
- g.Expect(avail).To(BeFalse())
- g.Expect(err).To(Not(BeNil()))
func TestKeysAvailableWildcardNoKeys(t *testing.T) {
avail, err := keysAvailable(
setupAgent([]agent.AddedKey{}),
- g.Expect(avail).To(BeFalse())
- g.Expect(err).To(Not(BeNil()))
func TestKeysAvailableWildcardWithKeys(t *testing.T) {
avail, err := keysAvailable(
setupAgent([]agent.AddedKey{
{PrivateKey: generateKey()},
@@ -96,13 +90,11 @@
- g.Expect(avail).To(BeTrue())
- g.Expect(err).To(BeNil())
func TestKeysAvailableUnknownFingerprint(t *testing.T) {
avail, err := keysAvailable(
setupAgent([]agent.AddedKey{
{PrivateKey: generateKey()},
@@ -110,13 +102,11 @@
[]string{"SHA256:01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b"},
- g.Expect(avail).To(BeFalse())
- g.Expect(err).To(Not(BeNil()))
func TestKeysAvailableFingerprintMD5NoPrefix(t *testing.T) {
@@ -132,13 +122,11 @@
[]string{ssh.FingerprintLegacyMD5(sshPub)},
- g.Expect(err).To(BeNil())
- g.Expect(avail).To(BeTrue())
func TestKeysAvailableFingerprintMD5Prefix(t *testing.T) {
@@ -154,13 +142,11 @@
[]string{"MD5:" + ssh.FingerprintLegacyMD5(sshPub)},
- g.Expect(err).To(BeNil())
- g.Expect(avail).To(BeTrue())
func TestKeysAvailableFingerprintSHA256Prefix(t *testing.T) {
@@ -176,13 +162,11 @@
[]string{ssh.FingerprintSHA256(sshPub)},
- g.Expect(err).To(BeNil())
- g.Expect(avail).To(BeTrue())
func TestKeysAvailableFingerprintSHA256NoPrefix(t *testing.T) {
@@ -199,6 +183,6 @@
[]string{ssh.FingerprintSHA256(sshPub)[7:]},
- g.Expect(err).To(BeNil())
- g.Expect(avail).To(BeTrue())
--- a/ssh/ssh_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/stages/stages_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/stages/stages_test.go Wed May 15 14:44:45 2019 -0500
@@ -18,77 +18,61 @@
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" -func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
func TestStageShouldRunOnFailEnabled(t *testing.T) {
stage := Stage{Enabled: true}
err := errors.New("testing")
- g.Expect(stage.ShouldRun(err)).To(BeTrue())
+ assert.True(t, stage.ShouldRun(err)) - g.Expect(stage.ShouldRun(err)).To(BeTrue())
+ assert.True(t, stage.ShouldRun(err)) - g.Expect(stage.ShouldRun(err)).To(BeFalse())
+ assert.False(t, stage.ShouldRun(err)) func TestStageShouldRunOnFailDisabled(t *testing.T) {
stage := Stage{Enabled: false}
err := errors.New("testing")
- g.Expect(stage.ShouldRun(err)).To(BeFalse())
+ assert.False(t, stage.ShouldRun(err)) - g.Expect(stage.ShouldRun(err)).To(BeFalse())
+ assert.False(t, stage.ShouldRun(err)) - g.Expect(stage.ShouldRun(err)).To(BeFalse())
+ assert.False(t, stage.ShouldRun(err)) func TestStageShouldRunOnSuccessEnabled(t *testing.T) {
stage := Stage{Enabled: true}
- g.Expect(stage.ShouldRun(nil)).To(BeTrue())
+ assert.True(t, stage.ShouldRun(nil)) - g.Expect(stage.ShouldRun(nil)).To(BeTrue())
+ assert.True(t, stage.ShouldRun(nil)) - g.Expect(stage.ShouldRun(nil)).To(BeFalse())
+ assert.False(t, stage.ShouldRun(nil)) func TestStageShouldRunOnSuccessDisabled(t *testing.T) {
stage := Stage{Enabled: false}
- g.Expect(stage.ShouldRun(nil)).To(BeFalse())
+ assert.False(t, stage.ShouldRun(nil)) - g.Expect(stage.ShouldRun(nil)).To(BeFalse())
+ assert.False(t, stage.ShouldRun(nil)) - g.Expect(stage.ShouldRun(nil)).To(BeFalse())
+ assert.False(t, stage.ShouldRun(nil)) --- a/stages/unmarshal_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/stages/unmarshal_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,92 +20,78 @@
"github.com/go-yaml/yaml"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestUnmarshalDefaults(t *testing.T) {
// we need a non empty string to get go-yaml to call our UnmarshalYAML
err := yaml.Unmarshal([]byte(data), &stage)
- g.Expect(err).To(BeNil())
- g.Expect(stage.Run).To(Equal("on-success"))
+ assert.Equal(t, stage.Run, "on-success") func TestUnmarshalAlwaysAttribute(t *testing.T) {
err := yaml.Unmarshal([]byte(data), &stage)
- g.Expect(err).To(BeNil())
- g.Expect(stage.Always).To(BeTrue())
- g.Expect(stage.Run).To(Equal("always"))
+ assert.True(t, stage.Always) + assert.Equal(t, stage.Run, "always") func TestUnmarshalInvalidRun(t *testing.T) {
err := yaml.Unmarshal([]byte(data), &stage)
- g.Expect(err).ToNot(BeNil())
func TestUnmarshalRunOnSuccess(t *testing.T) {
data := `run: on-success`
err := yaml.Unmarshal([]byte(data), &stage)
- g.Expect(err).To(BeNil())
- g.Expect(stage.Run).To(Equal("on-success"))
+ assert.Equal(t, stage.Run, "on-success") func TestUnmarshalRunOnFailure(t *testing.T) {
data := `run: on-failure`
err := yaml.Unmarshal([]byte(data), &stage)
- g.Expect(err).To(BeNil())
- g.Expect(stage.Run).To(Equal("on-failure"))
+ assert.Equal(t, stage.Run, "on-failure") func TestUnmarshalRunAlways(t *testing.T) {
err := yaml.Unmarshal([]byte(data), &stage)
- g.Expect(err).To(BeNil())
- g.Expect(stage.Run).To(Equal("always"))
+ assert.Equal(t, stage.Run, "always") func TestUnmarshalRunOverridesAlways(t *testing.T) {
err := yaml.Unmarshal([]byte(data), &stage)
- g.Expect(err).To(BeNil())
- g.Expect(stage.Always).To(BeTrue())
- g.Expect(stage.Run).To(Equal("on-failure"))
+ assert.True(t, stage.Always) + assert.Equal(t, stage.Run, "on-failure") --- a/state/state_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/tasks/clean_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/tasks/clean_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,20 +19,17 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestCleanSimple(t *testing.T) {
Files: []string{"foo", "bar", "**.pyc"},
- g.Expect(c.Valid()).To(BeNil())
+ assert.Nil(t, c.Valid()) func TestCleanNoFiles(t *testing.T) {
- g.Expect(c.Valid()).To(Not(BeNil()))
+ assert.NotNil(t, c.Valid()) --- a/tasks/clone_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/tasks/clone_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,12 +19,10 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestCloneTask(t *testing.T) {
files := []string{"one", "two", "three"}
@@ -32,11 +30,11 @@
task := &Clean{Files: files}
clone, err := CloneTask(task, taskType)
- g.Expect(err).To(BeNil())
- g.Expect(clone).To(Not(BeNil()))
+ assert.NotNil(t, clone) - g.Expect(clone).To(BeAssignableToTypeOf(taskType))
+ assert.Implements(t, (*Task)(nil), clone) cleanClone := clone.(*Clean)
- g.Expect(cleanClone.Files).To(BeEquivalentTo(files))
+ assert.ElementsMatch(t, cleanClone.Files, files) --- a/tasks/extend_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/tasks/extend_test.go Wed May 15 14:44:45 2019 -0500
@@ -20,7 +20,7 @@
"github.com/aphistic/gomol"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" "bitbucket.org/rw_grim/convey/environment"
"bitbucket.org/rw_grim/convey/runtime"
@@ -28,8 +28,6 @@
func TestExtendExecute(t *testing.T) {
fullEnv = environment.New()
@@ -49,24 +47,30 @@
Environment: []string{"foo=bar", "bar=baz"},
- g.Expect(c.Execute("task", nil, environment.New(), rt)).To(BeNil())
- g.Expect(fullEnv.Items()).To(ConsistOf("x=1", "foo=bar", "bar=bonk", "quux=honk"))
- g.Expect(fullEnv.Items()).To(HaveLen(4))
+ assert.Nil(t, c.Execute("task", nil, environment.New(), rt)) + assert.Len(t, fullEnv.Items(), 4) + []string{"x=1", "foo=bar", "bar=bonk", "quux=honk"}, - g.Expect(env.Items()).To(HaveLen(2))
- g.Expect(env.Items()).To(ConsistOf("bar=bonk", "quux=honk"))
+ assert.Len(t, env.Items(), 2) + []string{"bar=bonk", "quux=honk"}, func TestExtendDependencies(t *testing.T) {
c := &Extend{Task: "test-task"}
- g.Expect(c.Dependencies()).To(Equal([]string{"test-task"}))
+ assert.Equal(t, c.Dependencies(), []string{"test-task"}) func TestExtendResolve(t *testing.T) {
task.Y = []string{"foo", "bar"}
@@ -85,21 +89,19 @@
- g.Expect(err).To(BeNil())
- g.Expect(c.InnerTask).NotTo(BeNil())
- g.Expect(c.InnerTask).NotTo(BeIdenticalTo(task))
- g.Expect(c.InnerTask.(*mockTask).X).To(Equal(3))
- g.Expect(c.InnerTask.(*mockTask).Y).To(Equal([]string{"foo", "bar"}))
- g.Expect(c.InnerTask.(*mockTask).Z.A).To(Equal("wynken"))
- g.Expect(c.InnerTask.(*mockTask).Z.B).To(Equal("blynken"))
- g.Expect(c.InnerTask.(*mockTask).Z.C).To(Equal("nod"))
+ assert.NotNil(t, c.InnerTask) + assert.NotEqual(t, c.InnerTask, task) + assert.Equal(t, c.InnerTask.(*mockTask).X, 3) + assert.Equal(t, c.InnerTask.(*mockTask).Y, []string{"foo", "bar"}) + assert.Equal(t, c.InnerTask.(*mockTask).Z.A, "wynken") + assert.Equal(t, c.InnerTask.(*mockTask).Z.B, "blynken") + assert.Equal(t, c.InnerTask.(*mockTask).Z.C, "nod") func TestExtendResolveChain(t *testing.T) {
task.Y = []string{"foo", "bar"}
@@ -111,15 +113,18 @@
- g.Expect(c1.Resolve(taskMapping)).To(BeNil())
- g.Expect(c2.Resolve(taskMapping)).To(BeNil())
+ assert.Nil(t, c1.Resolve(taskMapping)) + assert.Nil(t, c2.Resolve(taskMapping)) - g.Expect(c2.InnerTask).NotTo(BeNil())
- g.Expect(c2.InnerTask).NotTo(BeIdenticalTo(c1))
- g.Expect(c2.InnerTask.(*Extend).InnerTask).NotTo(BeNil())
- g.Expect(c2.InnerTask.(*Extend).InnerTask.(*mockTask).X).To(Equal(3))
- g.Expect(c2.InnerTask.(*Extend).InnerTask.(*mockTask).Y).To(Equal([]string{"foo", "bar"}))
+ assert.NotNil(t, c2.InnerTask) + assert.NotNil(t, c2.InnerTask.(*Extend).InnerTask) + assert.Equal(t, c2.InnerTask.(*Extend).InnerTask.(*mockTask).X, 3) + c2.InnerTask.(*Extend).InnerTask.(*mockTask).Y, + []string{"foo", "bar"}, --- a/tasks/import_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/tasks/import_test.go Wed May 15 14:44:45 2019 -0500
@@ -21,7 +21,7 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" "bitbucket.org/rw_grim/convey/environment"
"bitbucket.org/rw_grim/convey/logging"
@@ -31,10 +31,8 @@
func testImport(t *testing.T, files []string) {
- g.Expect(err).To(BeNil())
@@ -51,13 +49,13 @@
err = importTask.Execute("", logging.NewAdapter("test"), env, rt)
- g.Expect(err).To(BeNil())
for _, file := range files {
_, dst := path.ParseFilePath(st.CfgPath, file)
_, err = os.Stat(filepath.Join(st.Workspace.Volume(), dst))
- Expect(err).ToNot(Equal(os.IsNotExist(err)))
+ assert.NotEqual(t, err, os.IsNotExist(err)) --- a/tasks/tasks_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)
--- a/util/product_test.go Sat Mar 30 16:28:57 2019 -0500
+++ b/util/product_test.go Wed May 15 14:44:45 2019 -0500
@@ -19,30 +19,32 @@
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert" func TestProduct(t *testing.T) {
p := CartesianProduct(map[string][]string{
- g.Expect(p).To(ConsistOf([]map[string]string{
- {"a": "1", "b": "4", "c": "6"},
- {"a": "1", "b": "4", "c": "7"},
- {"a": "1", "b": "5", "c": "6"},
- {"a": "1", "b": "5", "c": "7"},
- {"a": "2", "b": "4", "c": "6"},
- {"a": "2", "b": "4", "c": "7"},
- {"a": "2", "b": "5", "c": "6"},
- {"a": "2", "b": "5", "c": "7"},
- {"a": "3", "b": "4", "c": "6"},
- {"a": "3", "b": "4", "c": "7"},
- {"a": "3", "b": "5", "c": "6"},
- {"a": "3", "b": "5", "c": "7"},
+ {"a": "1", "b": "4", "c": "6"}, + {"a": "1", "b": "4", "c": "7"}, + {"a": "1", "b": "5", "c": "6"}, + {"a": "1", "b": "5", "c": "7"}, + {"a": "2", "b": "4", "c": "6"}, + {"a": "2", "b": "4", "c": "7"}, + {"a": "2", "b": "5", "c": "6"}, + {"a": "2", "b": "5", "c": "7"}, + {"a": "3", "b": "4", "c": "6"}, + {"a": "3", "b": "4", "c": "7"}, + {"a": "3", "b": "5", "c": "6"}, + {"a": "3", "b": "5", "c": "7"}, --- a/util/util_test.go Sat Mar 30 16:28:57 2019 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-// Copyright 2016-2018 Gary Kramlich <grim@reaperworld.com>
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
- "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
-func TestMain(m *testing.M) {
- RegisterFailHandler(ginkgo.Fail)