mirror of
https://github.com/containers/podman.git
synced 2025-08-16 04:15:29 +08:00
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:
@ -240,3 +240,7 @@ func createCache() {
|
|||||||
}
|
}
|
||||||
b.cleanup()
|
b.cleanup()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func isStopped(state string) bool {
|
||||||
|
return state == "exited" || state == "stopped"
|
||||||
|
}
|
||||||
|
@ -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())
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user