aboutsummaryrefslogtreecommitdiff
path: root/libpod/container.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-28 16:53:46 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-11-29 12:15:16 +0000
commit66ed73f89f532c093dd42d84e8c004421e6d2962 (patch)
tree35bed1bc8657a7c95b2e86773c9297a781b9760e /libpod/container.go
parente36483b1e644f8fb6f14a62c062ea635fb6851ed (diff)
downloadpodman-66ed73f89f532c093dd42d84e8c004421e6d2962.tar.gz
podman-66ed73f89f532c093dd42d84e8c004421e6d2962.tar.bz2
podman-66ed73f89f532c093dd42d84e8c004421e6d2962.zip
First pass at fixing test errors
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #68 Approved by: rhatdan
Diffstat (limited to 'libpod/container.go')
-rw-r--r--libpod/container.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/libpod/container.go b/libpod/container.go
index 8a2ff1fad..913d989ca 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -141,7 +141,7 @@ func (t ContainerState) String() string {
case ContainerStatePaused:
return "paused"
}
- return ""
+ return "bad state"
}
// ID returns the container's ID
@@ -566,10 +566,8 @@ func (c *Container) Kill(signal uint) error {
return err
}
- if c.state.State == ContainerStateUnknown ||
- c.state.State == ContainerStateConfigured ||
- c.state.State == ContainerStatePaused {
- return errors.Wrapf(ErrCtrStateInvalid, "can only kill created, running, or stopped containers")
+ if c.state.State != ContainerStateRunning {
+ return errors.Wrapf(ErrCtrStateInvalid, "can only kill running containers")
}
return c.runtime.ociRuntime.killContainer(c, signal)