testcontainers 0.3.0.1 → 0.3.1.0
raw patch · 4 files changed
+20/−8 lines, 4 filesdep ~aesondep ~bytestringdep ~optics-core
Dependency ranges changed: aeson, bytestring, optics-core, text
Files
- src/TestContainers.hs +1/−0
- src/TestContainers/Docker.hs +11/−2
- test/TestContainers/TastySpec.hs +3/−1
- testcontainers.cabal +5/−5
src/TestContainers.hs view
@@ -26,6 +26,7 @@ , M.setName , M.setCmd+ , M.setVolumeMounts , M.setRm , M.setEnv , M.setLink
src/TestContainers/Docker.hs view
@@ -67,6 +67,7 @@ , containerRequest , setName , setCmd+ , setVolumeMounts , setRm , setEnv , setLink@@ -330,6 +331,14 @@ req { cmd = Just newCmd } +-- | The volume mounts to link to Docker container. This is the equivalent+-- of passing the command on the @docker run -v@ invocation.+--+--+setVolumeMounts :: [(Text, Text)] -> ContainerRequest -> ContainerRequest+setVolumeMounts newVolumeMounts req =+ req { volumeMounts = newVolumeMounts }+ -- | Wether to remove the container once exited. This is equivalent to passing -- @--rm@ to @docker run@. (default is `True`). --@@ -633,9 +642,9 @@ let args | Just dockerfile <- mdockerfile =- [ "build", "-f", pack dockerfile, pack path ]+ [ "build", "--quiet", "-f", pack dockerfile, pack path ] | otherwise =- [ "build", pack path ]+ [ "build", "--quiet", pack path ] tracer <- askTracer output <- docker tracer args return $ Image
test/TestContainers/TastySpec.hs view
@@ -6,7 +6,7 @@ import Test.Tasty import Test.Tasty.HUnit import TestContainers.Tasty (MonadDocker, Pipe (Stdout),- containerRequest, fromTag, redis, run,+ containerRequest, fromBuildContext, fromTag, redis, run, setExpose, setRm, setWaitingFor, waitForLogLine, waitUntilMappedPortReachable,@@ -24,6 +24,8 @@ _rabbitmq <- run $ containerRequest (fromTag "rabbitmq:3.8.4") & setRm False & setWaitingFor (waitForLogLine Stdout (("completed with" `isInfixOf`)))++ _test <- run $ containerRequest (fromBuildContext "./test/container1" Nothing) pure ()
testcontainers.cabal view
@@ -1,6 +1,6 @@ cabal-version: >=1.10 name: testcontainers-version: 0.3.0.1+version: 0.3.1.0 synopsis: Docker containers for your integration tests. description: testcontainers is a Haskell library that provides a friendly API to run Docker containers. It is designed to create a runtime environment@@ -30,12 +30,12 @@ -- other-modules: -- other-extensions: build-depends: base >=4.12 && <5,- aeson >= 1.4.6 && < 1.5,+ aeson >= 1.4.6 && < 1.6 || >= 2.0 && < 2.1, aeson-optics >= 1.1 && < 1.2,- bytestring >= 0.10.8 && < 0.11,- text >= 1.2.3 && < 1.3,+ bytestring >= 0.10.8 && < 0.12,+ text >= 1.2.3 && < 1.3 || >= 2.0 && < 2.1, exceptions >= 0.10.4 && < 0.11,- optics-core >= 0.1 && < 0.4,+ optics-core >= 0.1 && < 0.5, process >= 1.6.5 && < 1.7, network >= 2.8.0 && < 3.2, mtl >= 2.2.2 && < 2.3,