diff options
Diffstat (limited to 'pkg/bindings/test')
-rw-r--r-- | pkg/bindings/test/common_test.go | 5 | ||||
-rw-r--r-- | pkg/bindings/test/containers_test.go | 7 | ||||
-rw-r--r-- | pkg/bindings/test/pods_test.go | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/pkg/bindings/test/common_test.go b/pkg/bindings/test/common_test.go index 409e620a3..6b8d6788c 100644 --- a/pkg/bindings/test/common_test.go +++ b/pkg/bindings/test/common_test.go @@ -3,6 +3,7 @@ package test_bindings import ( "context" "fmt" + "github.com/containers/libpod/libpod/define" "io/ioutil" "os" "os/exec" @@ -205,8 +206,8 @@ func (b *bindingTest) RunTopContainer(containerName *string, insidePod *bool, po if err != nil { return "", err } - waiting := "running" - _, err = containers.Wait(b.conn, ctr.ID, &waiting) + wait := define.ContainerStateRunning + _, err = containers.Wait(b.conn, ctr.ID, &wait) return ctr.ID, err } diff --git a/pkg/bindings/test/containers_test.go b/pkg/bindings/test/containers_test.go index afb0cc19b..f5465c803 100644 --- a/pkg/bindings/test/containers_test.go +++ b/pkg/bindings/test/containers_test.go @@ -1,6 +1,7 @@ package test_bindings import ( + "github.com/containers/libpod/libpod/define" "net/http" "strconv" "strings" @@ -282,8 +283,8 @@ var _ = Describe("Podman containers ", func() { var ( name = "top" exitCode int32 = -1 - pause = "paused" - unpause = "running" + pause = define.ContainerStatePaused + running = define.ContainerStateRunning ) errChan := make(chan error) _, err := bt.RunTopContainer(&name, nil, nil) @@ -301,7 +302,7 @@ var _ = Describe("Podman containers ", func() { errChan = make(chan error) go func() { - _, waitErr := containers.Wait(bt.conn, name, &unpause) + _, waitErr := containers.Wait(bt.conn, name, &running) errChan <- waitErr close(errChan) }() diff --git a/pkg/bindings/test/pods_test.go b/pkg/bindings/test/pods_test.go index fae1deca4..bcf8e69b8 100644 --- a/pkg/bindings/test/pods_test.go +++ b/pkg/bindings/test/pods_test.go @@ -81,7 +81,7 @@ var _ = Describe("Podman pods", func() { It("List pods with filters", func() { var newpod2 string = "newpod2" bt.Podcreate(&newpod2) - _, err = bt.RunTopContainer(nil, &trueFlag, &newpod) + _, err = bt.RunTopContainer(nil, &bindings.PTrue, &newpod) Expect(err).To(BeNil()) // Expected err with invalid filter params |