Fix wrong condition in bindings test

Thanks for Brent Baude <bbaude@redhat.com> for the fix.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich 2020-02-28 11:40:14 -05:00
parent 04d9cee01a
commit e95c493fec
No known key found for this signature in database
GPG Key ID: 03EDC70FD578067F
2 changed files with 6 additions and 2 deletions

View File

@ -240,3 +240,7 @@ func createCache() {
} }
b.cleanup() b.cleanup()
} }
func isStopped(state string) bool {
return state == "exited" || state == "stopped"
}

View File

@ -232,7 +232,7 @@ var _ = Describe("Podman containers ", func() {
// Ensure container is stopped // Ensure container is stopped
data, err := containers.Inspect(connText, name, nil) data, err := containers.Inspect(connText, name, nil)
Expect(err).To(BeNil()) Expect(err).To(BeNil())
Expect(data.State.Status).To(Equal("exited")) Expect(isStopped(data.State.Status)).To(BeTrue())
}) })
It("podman stop a running container by ID", func() { It("podman stop a running container by ID", func() {
@ -247,7 +247,7 @@ var _ = Describe("Podman containers ", func() {
// Ensure container is stopped // Ensure container is stopped
data, err = containers.Inspect(connText, name, nil) data, err = containers.Inspect(connText, name, nil)
Expect(err).To(BeNil()) Expect(err).To(BeNil())
Expect(data.State.Status).To(Equal("exited")) Expect(isStopped(data.State.Status)).To(BeTrue())
}) })
}) })