grim/convey

36f6e7a6b6ce
Parents c1a95d79fcc5
Children f3f0af8f51ad
replace gomega with testify and other go.mod cleanups
--- a/config/loader.go Mon Oct 18 00:39:41 2021 -0500
+++ b/config/loader.go Thu Nov 18 04:34:57 2021 -0600
@@ -22,7 +22,7 @@
log "github.com/sirupsen/logrus"
- "github.com/go-yaml/yaml"
+ "gopkg.in/yaml.v2"
)
func LoadString(data []byte) (*Config, error) {
--- a/config/raw.go Mon Oct 18 00:39:41 2021 -0500
+++ b/config/raw.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,7 +3,7 @@
import (
"fmt"
- "github.com/go-yaml/yaml"
+ "gopkg.in/yaml.v2"
"keep.imfreedom.org/grim/convey/metaplans"
"keep.imfreedom.org/grim/convey/plans"
--- a/docker/export_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/export_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,25 +3,21 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/tasks"
)
func TestExport(t *testing.T) {
- g := NewGomegaWithT(t)
-
e := &Export{
Files: []string{".:."},
}
- g.Expect(e.Valid()).To(BeNil())
+ assert.NoError(t, e.Valid())
}
func TestExportFilesRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
e := &Export{}
- g.Expect(e.Valid()).To(MatchError(tasks.ErrNoFiles))
+ assert.ErrorIs(t, e.Valid(), tasks.ErrNoFiles)
}
--- a/docker/import_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/import_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,25 +3,21 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/tasks"
)
func TestImport(t *testing.T) {
- g := NewGomegaWithT(t)
-
e := &Import{
Files: []string{".:."},
}
- g.Expect(e.Valid()).To(BeNil())
+ assert.NoError(t, e.Valid())
}
func TestImportFilesRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
e := &Import{}
- g.Expect(e.Valid()).To(MatchError(tasks.ErrNoFiles))
+ assert.ErrorIs(t, e.Valid(), tasks.ErrNoFiles)
}
--- a/docker/login_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/login_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,52 +3,44 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
)
func TestLogin(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Login{
Server: "docker.io",
Username: "username",
Password: "password",
}
- g.Expect(l.Valid()).To(BeNil())
+ assert.NoError(t, l.Valid())
}
func TestLoginServerRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Login{
Username: "username",
Password: "password",
}
- g.Expect(l.Valid()).To(MatchError(podman.ErrNoRegistry))
+ assert.ErrorIs(t, l.Valid(), podman.ErrNoRegistry)
}
func TestLoginUsernameRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Login{
Server: "docker.io",
Password: "password",
}
- g.Expect(l.Valid()).To(MatchError(podman.ErrNoUsername))
+ assert.ErrorIs(t, l.Valid(), podman.ErrNoUsername)
}
func TestLoginPasswordRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Login{
Server: "docker.io",
Username: "username",
}
- g.Expect(l.Valid()).To(MatchError(podman.ErrNoPassword))
+ assert.ErrorIs(t, l.Valid(), podman.ErrNoPassword)
}
--- a/docker/logout_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/logout_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,25 +3,21 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
)
func TestLogout(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Logout{
Server: "docker.io",
}
- g.Expect(l.Valid()).To(BeNil())
+ assert.NoError(t, l.Valid())
}
func TestLoginRegistryRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Logout{}
- g.Expect(l.Valid()).To(MatchError(podman.ErrNoRegistry))
+ assert.ErrorIs(t, l.Valid(), podman.ErrNoRegistry)
}
--- a/docker/pull_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/pull_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,48 +3,40 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
"keep.imfreedom.org/grim/convey/yaml"
)
func TestPullImage(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Pull{
Image: "foo",
}
- g.Expect(p.Valid()).To(BeNil())
+ assert.NoError(t, p.Valid())
}
func TestPullImages(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Pull{
Images: []string{"foo", "bar"},
}
- g.Expect(p.Valid()).To(BeNil())
+ assert.NoError(t, p.Valid())
}
func TestPullImagesMerged(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Pull{
Image: "foo",
Images: []string{"bar"},
}
- g.Expect(p.Valid()).To(BeNil())
- g.Expect(p.Images).To(Equal(yaml.StringOrSlice{"foo", "bar"}))
+ assert.NoError(t, p.Valid())
+ assert.Equal(t, p.Images, yaml.StringOrSlice{"foo", "bar"})
}
func TestPullImageRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{}
- g.Expect(p.Valid()).To(MatchError(podman.ErrNoTags))
+ assert.ErrorIs(t, p.Valid(), podman.ErrNoTags)
}
--- a/docker/push_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/push_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,48 +3,40 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
"keep.imfreedom.org/grim/convey/yaml"
)
func TestPushImage(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{
Image: "foo",
}
- g.Expect(p.Valid()).To(BeNil())
+ assert.NoError(t, p.Valid())
}
func TestPushImages(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{
Images: []string{"foo", "bar"},
}
- g.Expect(p.Valid()).To(BeNil())
+ assert.NoError(t, p.Valid())
}
func TestPushImagesMerged(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{
Image: "foo",
Images: []string{"bar"},
}
- g.Expect(p.Valid()).To(BeNil())
- g.Expect(p.Images).To(Equal(yaml.StringOrSlice{"foo", "bar"}))
+ assert.NoError(t, p.Valid())
+ assert.Equal(t, p.Images, yaml.StringOrSlice{"foo", "bar"})
}
func TestPushImageRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{}
- g.Expect(p.Valid()).To(MatchError(podman.ErrNoTags))
+ assert.ErrorIs(t, p.Valid(), podman.ErrNoTags)
}
--- a/docker/remove_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/remove_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,48 +3,40 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
"keep.imfreedom.org/grim/convey/yaml"
)
func TestRemoveImage(t *testing.T) {
- g := NewGomegaWithT(t)
-
r := &Remove{
Image: "foo",
}
- g.Expect(r.Valid()).To(BeNil())
+ assert.NoError(t, r.Valid())
}
func TestRemoveImages(t *testing.T) {
- g := NewGomegaWithT(t)
-
r := &Remove{
Images: []string{"foo", "bar"},
}
- g.Expect(r.Valid()).To(BeNil())
+ assert.NoError(t, r.Valid())
}
func TestRemoveMerge(t *testing.T) {
- g := NewGomegaWithT(t)
-
r := &Remove{
Image: "foo",
Images: []string{"bar", "baz"},
}
- g.Expect(r.Valid()).To(BeNil())
- g.Expect(r.Images).To(Equal(yaml.StringOrSlice{"foo", "bar", "baz"}))
+ assert.NoError(t, r.Valid())
+ assert.Equal(t, r.Images, yaml.StringOrSlice{"foo", "bar", "baz"})
}
func TestRemoveImagesRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
r := &Remove{}
- g.Expect(r.Valid()).To(MatchError(podman.ErrNoTags))
+ assert.ErrorIs(t, r.Valid(), podman.ErrNoTags)
}
--- a/docker/run_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/run_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,25 +3,21 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
)
func TestRun(t *testing.T) {
- g := NewGomegaWithT(t)
-
r := &Run{
Image: "image",
}
- g.Expect(r.Valid()).To(BeNil())
+ assert.NoError(t, r.Valid())
}
func TestRunImageRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
r := &Run{}
- g.Expect(r.Valid()).To(MatchError(podman.ErrNoImage))
+ assert.ErrorIs(t, r.Valid(), podman.ErrNoImage)
}
--- a/docker/tag_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/docker/tag_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,64 +3,54 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/podman"
"keep.imfreedom.org/grim/convey/yaml"
)
func TestTagSingleDestination(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := Tag{
Source: "foo",
Destination: "bar",
}
- g.Expect(tag.Valid()).To(BeNil())
- g.Expect(tag.Destinations).To(Equal(yaml.StringOrSlice{"bar"}))
+ assert.NoError(t, tag.Valid())
+ assert.Equal(t, tag.Destinations, yaml.StringOrSlice{"bar"})
}
func TestTagMultipleDestinations(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := Tag{
Source: "foo",
Destinations: []string{"bar", "baz"},
}
- g.Expect(tag.Valid()).To(BeNil())
+ assert.NoError(t, tag.Valid())
}
func TestTagMergedDestinations(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := Tag{
Source: "foo",
Destination: "bar",
Destinations: []string{"baz"},
}
- g.Expect(tag.Valid()).To(BeNil())
- g.Expect(tag.Destinations).To(Equal(yaml.StringOrSlice{"bar", "baz"}))
+ assert.NoError(t, tag.Valid())
+ assert.Equal(t, tag.Destinations, yaml.StringOrSlice{"bar", "baz"})
}
func TestTagSourceRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := Tag{
Destination: "bar",
}
- g.Expect(tag.Valid()).To(MatchError(podman.ErrNoImage))
+ assert.ErrorIs(t, tag.Valid(), podman.ErrNoImage)
}
func TestTagDestinationsRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := Tag{
Source: "foo",
}
- g.Expect(tag.Valid()).To(MatchError(podman.ErrNoTargets))
+ assert.ErrorIs(t, tag.Valid(), podman.ErrNoTargets)
}
--- a/go.mod Mon Oct 18 00:39:41 2021 -0500
+++ b/go.mod Thu Nov 18 04:34:57 2021 -0600
@@ -2,18 +2,25 @@
require (
github.com/alecthomas/kong v0.2.17
- github.com/go-yaml/yaml v2.1.0+incompatible
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
- github.com/kr/pretty v0.1.0 // indirect
- github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-zglob v0.0.3
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
- github.com/onsi/gomega v1.16.0
github.com/opencontainers/selinux v1.9.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
+ gopkg.in/yaml.v2 v2.4.0
+)
+
+require (
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/kr/pretty v0.1.0 // indirect
+ github.com/mattn/go-colorable v0.1.11 // indirect
+ github.com/mattn/go-isatty v0.0.14 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
+ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
-go 1.13
+go 1.17
--- a/go.sum Mon Oct 18 00:39:41 2021 -0500
+++ b/go.sum Thu Nov 18 04:34:57 2021 -0600
@@ -3,28 +3,6 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
-github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
-github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
-github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
-github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
-github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
-github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
-github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
-github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
-github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
-github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
-github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
-github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
@@ -40,17 +18,6 @@
github.com/mattn/go-zglob v0.0.3/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
-github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
-github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
-github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
-github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
-github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
-github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
-github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
-github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
-github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
-github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c=
-github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/opencontainers/selinux v1.9.1 h1:b4VPEF3O5JLZgdTDBmGepaaIbAo0GqoF6EBRq5f/g3Y=
github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -61,72 +28,17 @@
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 h1:DzZ89McO9/gWPsQXS/FVKAlG02ZjaQ6AlZRBimEYOd0=
-golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
-golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac h1:oN6lz7iLW/YC7un8pq+9bOLyXrprv2+DKfkJY+2LJJw=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
-golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
-google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
-google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
-google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
-google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
-gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
-gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
--- a/plans/plans_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/plans/plans_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -19,8 +19,8 @@
import (
"testing"
- "github.com/go-yaml/yaml"
"github.com/stretchr/testify/assert"
+ "gopkg.in/yaml.v2"
cYaml "keep.imfreedom.org/grim/convey/yaml"
)
--- a/podman/build_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/podman/build_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,36 +3,30 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
)
func TestBuild(t *testing.T) {
- g := NewGomegaWithT(t)
-
b := &Build{
Containerfile: "Dockerfile",
Tags: []string{"foo:latest"},
}
- g.Expect(b.Valid()).To(BeNil())
+ assert.NoError(t, b.Valid())
}
func TestBuildContainerfileRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
b := &Build{
Tags: []string{"foo:latest"},
}
- g.Expect(b.Valid()).To(MatchError(ErrNoContainerfile))
+ assert.ErrorIs(t, b.Valid(), ErrNoContainerfile)
}
func TestBuildTagsRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
b := &Build{
Containerfile: "Dockerfile",
}
- g.Expect(b.Valid()).To(MatchError(ErrNoTags))
+ assert.ErrorIs(t, b.Valid(), ErrNoTags)
}
--- a/podman/login_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/podman/login_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,50 +3,42 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
)
func TestLogin(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Login{
Registry: "docker.io",
Username: "username",
Password: "password",
}
- g.Expect(l.Valid()).To(BeNil())
+ assert.NoError(t, l.Valid())
}
func TestLoginRegistryRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Login{
Username: "username",
Password: "password",
}
- g.Expect(l.Valid()).To(MatchError(ErrNoRegistry))
+ assert.ErrorIs(t, l.Valid(), ErrNoRegistry)
}
func TestLoginUsernameRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Login{
Registry: "docker.io",
Password: "password",
}
- g.Expect(l.Valid()).To(MatchError(ErrNoUsername))
+ assert.ErrorIs(t, l.Valid(), ErrNoUsername)
}
func TestLoginPasswordRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Login{
Registry: "docker.io",
Username: "username",
}
- g.Expect(l.Valid()).To(MatchError(ErrNoPassword))
+ assert.ErrorIs(t, l.Valid(), ErrNoPassword)
}
--- a/podman/logout_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/podman/logout_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,23 +3,19 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
)
func TestLogout(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Logout{
Registry: "docker.io",
}
- g.Expect(l.Valid()).To(BeNil())
+ assert.NoError(t, l.Valid())
}
func TestLogoutRegistryRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
l := &Logout{}
- g.Expect(l.Valid()).To(MatchError(ErrNoRegistry))
+ assert.ErrorIs(t, l.Valid(), ErrNoRegistry)
}
--- a/podman/pull_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/podman/pull_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,35 +3,29 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/yaml"
)
func TestPullString(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Pull{
Tags: yaml.StringOrSlice{"foo"},
}
- g.Expect(p.Valid()).To(BeNil())
+ assert.NoError(t, p.Valid())
}
func TestPullSlice(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Pull{
Tags: []string{"foo", "bar"},
}
- g.Expect(p.Valid()).To(BeNil())
+ assert.NoError(t, p.Valid())
}
func TestPullTagsRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{}
- g.Expect(p.Valid()).To(MatchError(ErrNoTags))
+ assert.ErrorIs(t, p.Valid(), ErrNoTags)
}
--- a/podman/push_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/podman/push_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,35 +3,29 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
"keep.imfreedom.org/grim/convey/yaml"
)
func TestPushString(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{
Tags: yaml.StringOrSlice{"foo"},
}
- g.Expect(p.Valid()).To(BeNil())
+ assert.NoError(t, p.Valid())
}
func TestPushSlice(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{
Tags: []string{"foo", "bar"},
}
- g.Expect(p.Valid()).To(BeNil())
+ assert.NoError(t, p.Valid())
}
func TestPushTagsRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
p := &Push{}
- g.Expect(p.Valid()).To(MatchError(ErrNoTags))
+ assert.ErrorIs(t, p.Valid(), ErrNoTags)
}
--- a/podman/remove_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/podman/remove_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,23 +3,19 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
)
func TestRemove(t *testing.T) {
- g := NewGomegaWithT(t)
-
r := &Remove{
Tags: []string{"foo"},
}
- g.Expect(r.Valid()).To(BeNil())
+ assert.NoError(t, r.Valid())
}
func TestRemoveTagsRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
r := &Remove{}
- g.Expect(r.Valid()).To(MatchError(ErrNoTags))
+ assert.ErrorIs(t, r.Valid(), ErrNoTags)
}
--- a/podman/tag_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/podman/tag_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -3,47 +3,39 @@
import (
"testing"
- . "github.com/onsi/gomega"
+ "github.com/stretchr/testify/assert"
)
func TestTagSingleTarget(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := &Tag{
Image: "foo",
Targets: []string{"bar"},
}
- g.Expect(tag.Valid()).To(BeNil())
+ assert.NoError(t, tag.Valid())
}
func TestTagMultipleTargets(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := &Tag{
Image: "foo",
Targets: []string{"bar", "baz"},
}
- g.Expect(tag.Valid()).To(BeNil())
+ assert.NoError(t, tag.Valid())
}
func TestTagImageRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := &Tag{
Targets: []string{"bar"},
}
- g.Expect(tag.Valid()).To(MatchError(ErrNoImage))
+ assert.ErrorIs(t, tag.Valid(), ErrNoImage)
}
func TestTagTargetRequired(t *testing.T) {
- g := NewGomegaWithT(t)
-
tag := &Tag{
Image: "foo",
}
- g.Expect(tag.Valid()).To(MatchError(ErrNoTargets))
+ assert.ErrorIs(t, tag.Valid(), ErrNoTargets)
}
--- a/stages/unmarshal_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/stages/unmarshal_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -19,8 +19,8 @@
import (
"testing"
- "github.com/go-yaml/yaml"
"github.com/stretchr/testify/assert"
+ "gopkg.in/yaml.v2"
)
func TestUnmarshalDefaults(t *testing.T) {
--- a/tasks/clone.go Mon Oct 18 00:39:41 2021 -0500
+++ b/tasks/clone.go Thu Nov 18 04:34:57 2021 -0600
@@ -17,7 +17,7 @@
package tasks
import (
- "github.com/go-yaml/yaml"
+ "gopkg.in/yaml.v2"
)
// CloneTask creates a task of the given type from the given payload. It
--- a/yaml/stringslice.go Mon Oct 18 00:39:41 2021 -0500
+++ b/yaml/stringslice.go Thu Nov 18 04:34:57 2021 -0600
@@ -18,7 +18,7 @@
package yaml
import (
- "github.com/go-yaml/yaml"
+ "gopkg.in/yaml.v2"
)
// StringOrSlice is a []string type alias that has a custom UnmarshalYAML
--- a/yaml/stringslice_test.go Mon Oct 18 00:39:41 2021 -0500
+++ b/yaml/stringslice_test.go Thu Nov 18 04:34:57 2021 -0600
@@ -19,8 +19,8 @@
import (
"testing"
- "github.com/go-yaml/yaml"
"github.com/stretchr/testify/assert"
+ "gopkg.in/yaml.v2"
)
func unmarshal(t *testing.T, str string) StringOrSlice {