on master help sign in
Add NetworkingConfig to the container integration test
commit1b7f0704f85215916f52640d6051afe39e6a346d authorDaQuirm <leo.daquirm@gmail.com> dateSat 14 Apr 2018, 23:03 (9 years ago) parent60cc72f
1 file changed+2−1
tests/tests.hs+2−1
tests/tests.hs+2−1
@@ -93,7 +93,8 @@ testRunAndReadLog :: IO ()
9393testRunAndReadLog =
9494 runDocker $
9595 do let containerConfig = (defaultContainerConfig (testImageName <> ":latest")) {env = [EnvVar "TEST" "123"]}
96− containerId <- createContainer (CreateOpts containerConfig defaultHostConfig Nothing) Nothing
96+ networkingConfig = NetworkingConfig $ HM.fromList [("test-network", EndpointConfig ["cellar-door"])]
97+ containerId <- createContainer (CreateOpts containerConfig defaultHostConfig (Just networkingConfig)) Nothing
9798 c <- fromRight containerId
9899 status1 <- startContainer defaultStartOpts c
99100 _ <- inspectContainer c >>= fromRight