summaryrefslogtreecommitdiff
path: root/libpod/sql_state.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-01-04 16:04:46 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-01-17 15:26:43 +0000
commit67b6c132d83b94d20c9ef204c8dcba3de5581f60 (patch)
treebccb7d4174a53899f4931c6eac55d93dcd7602f8 /libpod/sql_state.go
parent65d643caeb31364b59612f0f91be90894c65d703 (diff)
downloadpodman-67b6c132d83b94d20c9ef204c8dcba3de5581f60.tar.gz
podman-67b6c132d83b94d20c9ef204c8dcba3de5581f60.tar.bz2
podman-67b6c132d83b94d20c9ef204c8dcba3de5581f60.zip
Modify unit tests for state to run on all state implementations
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #229 Approved by: rhatdan
Diffstat (limited to 'libpod/sql_state.go')
-rw-r--r--libpod/sql_state.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/sql_state.go b/libpod/sql_state.go
index 3bdca0e63..866da27bc 100644
--- a/libpod/sql_state.go
+++ b/libpod/sql_state.go
@@ -651,6 +651,8 @@ func (s *SQLState) SaveContainer(ctr *Container) error {
return errors.Wrapf(err, "error retrieving number of rows modified by update of container %s", ctr.ID())
}
if rows == 0 {
+ // Container was probably removed elsewhere
+ ctr.valid = false
return ErrNoSuchCtr
}