Skip to content

Commit

Permalink
More on docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasjm committed Feb 4, 2025
1 parent 4fb96cf commit 39c6eea
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions sandwich-site/docs/context-libraries/sandwich-contexts-minio.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,29 @@
id: sandwich-contexts-minio
title: MinIO
---

The [Test.Sandwich.Contexts.MinIO](https://hackage.haskell.org/package/sandwich-contexts-minio/docs/Test-Sandwich-Contexts-MinIO.html) module provides the ability introduce MinIO S3 servers, either using a raw binary or a container system.

This module is provided as part of the [sandwich-contexts-minio](https://hackage.haskell.org/package/sandwich-contexts-minio) package.

## Via Nix-provided binary

```haskell title="https://github.com/codedownio/sandwich/blob/master/demos/demo-minio/app/Main.hs"
spec :: TopSpec
spec = describe "Introducing MinIO" $ do
introduceNixContext nixpkgsReleaseDefault $ introduceMinIOViaNix defaultMinIOContextOptions $ do
it "prints the MinIO server info" $ do
server <- getContext testS3Server
info [i|Got S3 server: #{server}|]
```

## Via container

```haskell title="https://github.com/codedownio/sandwich/blob/master/demos/demo-minio/app/Main.hs"
spec :: TopSpec
spec = describe "Introducing MinIO" $ do
introduceMinIOViaContainer defaultMinIOContextOptions defaultContainerOptions $ do
it "prints the MinIO server info" $ do
server <- getContext testS3Server
info [i|Got S3 server: #{server}|]
```
2 changes: 1 addition & 1 deletion sandwich-webdriver/src/Test/Sandwich/WebDriver/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}

module Test.Sandwich.WebDriver.Types (
-- * Type aliases to make signatures shorter
-- * Type aliases to make signatures shorter.
BaseMonad
, ContextWithWebdriverDeps
, ContextWithBaseDeps
Expand Down

0 comments on commit 39c6eea

Please sign in to comment.