@@ -73,15 +73,12 @@ testFindImage =
7373
7474testListContainers :: IO ()
7575testListContainers =
76− runDocker $ do
77− res <- listContainers $ ListOpts { all=True }
78− case res of
79− Right cs -> do
80− forM_ cs $ \r -> do
81− lift $ print (containerNetworks r)
82− lift $ print (containerStatus r)
83− Left e -> lift $ print e
84− lift $ assert $ isRight res
76+ runDocker $
77+ do containerId <- createContainer (defaultCreateOpts (testImageName <> ":latest")) Nothing
78+ c <- fromRight containerId
79+ res <- listContainers $ ListOpts { all=True }
80+ deleteContainer (DeleteOpts True True) c
81+ lift $ assert $ isRight res
8582
8683testBuildFromDockerfile :: IO ()
8784testBuildFromDockerfile = do