sandwich-contexts-minio 0.1.0.2 → 0.1.0.3
raw patch · 2 files changed
+17/−8 lines, 2 filesdep ~sandwich
Dependency ranges changed: sandwich
Files
lib/Test/Sandwich/Contexts/MinIO.hs view
@@ -70,7 +70,7 @@ import Test.Sandwich.Contexts.Nix import Test.Sandwich.Contexts.Types.Network import Test.Sandwich.Contexts.Types.S3-import UnliftIO.Async+ import UnliftIO.Directory import UnliftIO.Exception import UnliftIO.Process@@ -87,15 +87,24 @@ & (if testS3ServerHttpMode == HttpModeHttpsNoValidate then disableTLSCertValidation else id) data MinIOContextOptions = MinIOContextOptions {+ -- | Bucket name to create on startup. minioContextBucket :: Maybe Text++ -- | Image name to use when launching MinIO in container mode.+ , minioContextImageName :: String+ -- | Container labels to apply when launching MinIO in container mode. , minioContextLabels :: Map Text Text+ -- | Maximum time to wait in microseconds before seeing an "API:" message during startup , minioContextStartupTimeout :: Int } deriving (Show, Eq) defaultMinIOContextOptions :: MinIOContextOptions defaultMinIOContextOptions = MinIOContextOptions { minioContextBucket = Just "bucket1"++ , minioContextImageName = "minio/minio:RELEASE.2022-09-25T15-44-53Z" , minioContextLabels = mempty+ , minioContextStartupTimeout = 60_000_000 } @@ -184,7 +193,7 @@ line <- liftIO $ T.hGetLine hRead debug [i|minio: #{line}|] - withAsync forwardOutput $ \_ -> do+ managedWithAsync_ "minio-output-forward" forwardOutput $ do (hostname, port) <- case uriToUse of Nothing -> expectationFailure [i|Couldn't find MinIO URI to use.|] Just (URI { uriAuthority=(Just URIAuth {..}) }) -> case readMaybe (L.drop 1 uriPort) of@@ -271,15 +280,15 @@ ] <> labelArgs <> [- "minio/minio:RELEASE.2022-09-25T15-44-53Z"+ minioContextImageName , "server", "/data", "--console-address", ":9001"- ]+ ] info [i|Got command: #{cp}"|] - createProcessWithLogging cp+ createProcessWithFileLogging' "minio-server" cp )- (\_ -> do+ (\_ -> void $ liftIO $ readCreateProcess (shell [i|#{containerOptionsSystem} rm -f --volumes #{containerName}|]) "" ) (\p -> do
sandwich-contexts-minio.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: sandwich-contexts-minio-version: 0.1.0.2+version: 0.1.0.3 synopsis: Sandwich test contexts for MinIO description: Please see README.md author: Tom McLaughlin@@ -50,7 +50,7 @@ , relude , retry , safe- , sandwich >=0.3.0.3+ , sandwich >=0.3.1.0 , sandwich-contexts , string-interpolate , temporary