@@ -71,14 +71,19 @@ testRunAndReadLog = runDocker $ do
7171 lift $ assert $ status3 == Right ()
7272
7373
74−sampleEP = ExposedPorts $ M.fromList [(80, TCP), (1337, UDP)]
75−
76−testExposedPorts :: TestTree
77−testExposedPorts = testGroup "Testing ExposedPorts JSON" [ testTCP, testUDP ]
74+testExposedPortsJson :: TestTree
75+testExposedPortsJson = testGroup "Testing ExposedPorts JSON" [ testTCP, testUDP ]
7876 where
7977 testTCP = testCase "tcp port" $ assert $ JSON.toJSON sampleEP ^. key "80/tcp" . _Object == HM.empty
8078 testUDP = testCase "udp port" $ assert $ JSON.toJSON sampleEP ^. key "1337/tcp" . _Object == HM.empty
79+ sampleEP = ExposedPorts $ M.fromList [(80, TCP), (1337, UDP)]
8180
81+testVolumesJson :: TestTree
82+testVolumesJson = testGroup "Testing Volumes JSON" [ testSample1, testSample2 ]
83+ where
84+ testSample1 = testCase "Test exposing volume: /tmp" $ assert $ JSON.toJSON sampleVolumes ^. key "/tmp" . _Object == HM.empty
85+ testSample2 = testCase "Test exposing volume: /opt" $ assert $ JSON.toJSON sampleVolumes ^. key "/opt" . _Object == HM.empty
86+ sampleVolumes = Volumes ["/tmp", "/opt"]
8287
8388integrationTests :: TestTree
8489integrationTests = testGroup "Integration Tests" [
@@ -87,7 +92,7 @@ integrationTests = testGroup "Integration Tests" [
8792 testCase "Run a dummy container and read its log" testRunAndReadLog]
8893
8994jsonTests :: TestTree
90−jsonTests = testGroup "JSON Tests" [testExposedPorts]
95+jsonTests = testGroup "JSON Tests" [testExposedPortsJson, testVolumesJson]
9196
9297setup :: IO ()
9398setup = system ("docker build -t "++unpack testImageName++" tests") >> return ()