summaryrefslogtreecommitdiff
path: root/libpod/state_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/state_test.go')
-rw-r--r--libpod/state_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/libpod/state_test.go b/libpod/state_test.go
index e5c5a1de0..8a678ba82 100644
--- a/libpod/state_test.go
+++ b/libpod/state_test.go
@@ -634,6 +634,15 @@ func TestContainerInUseInvalidContainer(t *testing.T) {
})
}
+func TestContainerInUseCtrNotInState(t *testing.T) {
+ runForAllStates(t, func(t *testing.T, state State, lockPath string) {
+ testCtr, err := getTestCtr1(lockPath)
+ assert.NoError(t, err)
+ _, err := state.ContainerInUse(testCtr)
+ assert.Error(t, err)
+ })
+}
+
func TestContainerInUseOneContainer(t *testing.T) {
runForAllStates(t, func(t *testing.T, state State, lockPath string) {
testCtr1, err := getTestCtr1(lockPath)