mirror of
https://github.com/codedownio/sandwich.git
synced 2024-09-11 19:57:11 +03:00
Sandwich.Contexts -> Test.Sandwich.Contexts
This commit is contained in:
parent
1a116beae6
commit
4650a9c197
@ -14,10 +14,10 @@ import Network.HTTP.Client
|
||||
import Network.HaskellNet.SMTP
|
||||
import Network.Mail.Mime
|
||||
import Network.Socket (PortNumber)
|
||||
import Sandwich.Contexts.FakeSmtpServer
|
||||
import Sandwich.Contexts.Files
|
||||
import Sandwich.Contexts.Nix
|
||||
import Sandwich.Contexts.Waits
|
||||
import Test.Sandwich.Contexts.FakeSmtpServer
|
||||
import Test.Sandwich.Contexts.Files
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Waits
|
||||
import Test.Sandwich
|
||||
import UnliftIO.Process
|
||||
|
||||
|
@ -9,11 +9,11 @@ import Control.Monad.IO.Class
|
||||
import Control.Monad.Logger
|
||||
import qualified Data.ByteString.Lazy as BL
|
||||
import Data.String.Interpolate
|
||||
import Sandwich.Contexts.FakeSmtpServer
|
||||
import Sandwich.Contexts.Files
|
||||
import Sandwich.Contexts.MinIO
|
||||
import Sandwich.Contexts.Nix
|
||||
import Sandwich.Contexts.Waits
|
||||
import Test.Sandwich.Contexts.FakeSmtpServer
|
||||
import Test.Sandwich.Contexts.Files
|
||||
import Test.Sandwich.Contexts.MinIO
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Waits
|
||||
import Test.Sandwich
|
||||
|
||||
|
||||
|
@ -6,8 +6,8 @@ module Main where
|
||||
import Control.Concurrent
|
||||
import Control.Monad.IO.Class
|
||||
import Control.Monad.Reader
|
||||
import Sandwich.Contexts.Files
|
||||
import Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Files
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import Test.Sandwich
|
||||
import UnliftIO.Process
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
-- |
|
||||
|
||||
module Sandwich.Contexts.Nix.CaddyProxy where
|
@ -1,6 +1,6 @@
|
||||
{-# LANGUAGE GADTs #-}
|
||||
|
||||
module Sandwich.Contexts.Container.PostgreSQL (
|
||||
module Test.Sandwich.Contexts.Container.PostgreSQL (
|
||||
PostgresDatabaseTestContext (..)
|
||||
, withPostgresContainer
|
||||
|
||||
@ -22,8 +22,8 @@ import Data.String.Interpolate
|
||||
import qualified Data.Text as T
|
||||
import Network.Socket (PortNumber)
|
||||
import Relude
|
||||
import Sandwich.Contexts.Util.Container
|
||||
import Sandwich.Contexts.Util.UUID
|
||||
import Test.Sandwich.Contexts.Util.Container
|
||||
import Test.Sandwich.Contexts.Util.UUID
|
||||
import System.Exit
|
||||
import Test.Sandwich
|
||||
import UnliftIO.Exception
|
@ -4,7 +4,7 @@
|
||||
{-# LANGUAGE TypeApplications #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
module Sandwich.Contexts.FakeSmtpServer (
|
||||
module Test.Sandwich.Contexts.FakeSmtpServer (
|
||||
introduceFakeSmtpServerNix
|
||||
, introduceFakeSmtpServer'
|
||||
|
||||
@ -33,11 +33,11 @@ import GHC.TypeLits
|
||||
import Network.HTTP.Client
|
||||
import Network.Socket (PortNumber)
|
||||
import Relude
|
||||
import Sandwich.Contexts.FakeSmtpServer.Derivation
|
||||
import Sandwich.Contexts.Files
|
||||
import Sandwich.Contexts.Nix
|
||||
import Sandwich.Contexts.Util.Aeson
|
||||
import Sandwich.Contexts.Waits
|
||||
import Test.Sandwich.Contexts.FakeSmtpServer.Derivation
|
||||
import Test.Sandwich.Contexts.Files
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Util.Aeson
|
||||
import Test.Sandwich.Contexts.Waits
|
||||
import System.FilePath
|
||||
import System.IO
|
||||
import System.Process
|
@ -1,5 +1,5 @@
|
||||
|
||||
module Sandwich.Contexts.FakeSmtpServer.Derivation (
|
||||
module Test.Sandwich.Contexts.FakeSmtpServer.Derivation (
|
||||
fakeSmtpServerDerivation
|
||||
) where
|
||||
|
@ -8,7 +8,7 @@
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
module Sandwich.Contexts.Files (
|
||||
module Test.Sandwich.Contexts.Files (
|
||||
introduceBinaryViaEnvironment
|
||||
|
||||
, introduceBinaryViaNixPackage
|
||||
@ -30,7 +30,7 @@ import Control.Monad.Logger
|
||||
import Data.String.Interpolate
|
||||
import GHC.TypeLits
|
||||
import Relude
|
||||
import Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import System.FilePath
|
||||
import Test.Sandwich
|
||||
import UnliftIO.Directory
|
@ -4,7 +4,7 @@
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
|
||||
|
||||
module Sandwich.Contexts.MinIO (
|
||||
module Test.Sandwich.Contexts.MinIO (
|
||||
MinIOContextOptions (..)
|
||||
, defaultMinIOContextOptions
|
||||
|
||||
@ -44,12 +44,12 @@ import Network.Socket (PortNumber)
|
||||
import Network.URI (URI(..), URIAuth(..), parseURI)
|
||||
import Relude
|
||||
import Safe
|
||||
import Sandwich.Contexts.Files
|
||||
import Sandwich.Contexts.Nix
|
||||
import Sandwich.Contexts.Util.Aeson
|
||||
import Sandwich.Contexts.Util.Container
|
||||
import Sandwich.Contexts.Util.UUID
|
||||
import Sandwich.Contexts.Waits
|
||||
import Test.Sandwich.Contexts.Files
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Util.Aeson
|
||||
import Test.Sandwich.Contexts.Util.Container
|
||||
import Test.Sandwich.Contexts.Util.UUID
|
||||
import Test.Sandwich.Contexts.Waits
|
||||
import System.Exit
|
||||
import System.FilePath
|
||||
import System.IO.Temp
|
@ -2,7 +2,7 @@
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
module Sandwich.Contexts.Nix (
|
||||
module Test.Sandwich.Contexts.Nix (
|
||||
-- * Nix contexts
|
||||
introduceNixContext
|
||||
, nixContext
|
||||
@ -34,7 +34,7 @@ import qualified Data.Text as T
|
||||
import qualified Data.Text.IO as T
|
||||
import qualified Data.Vector as V
|
||||
import Relude
|
||||
import Sandwich.Contexts.Util.Aeson
|
||||
import Test.Sandwich.Contexts.Util.Aeson
|
||||
import System.FilePath
|
||||
import System.IO.Temp
|
||||
import Test.Sandwich
|
@ -0,0 +1,3 @@
|
||||
-- |
|
||||
|
||||
module Test.Sandwich.Contexts.Nix.CaddyProxy where
|
@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE TypeOperators #-}
|
||||
|
||||
module Sandwich.Contexts.Nix.PostgreSQL (
|
||||
module Test.Sandwich.Contexts.Nix.PostgreSQL (
|
||||
postgres
|
||||
, introducePostgres
|
||||
|
||||
@ -21,7 +21,7 @@ import Control.Monad.Logger
|
||||
import Data.String.Interpolate
|
||||
import qualified Data.Text.IO as T
|
||||
import Relude hiding (withFile)
|
||||
import Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import System.Exit
|
||||
import System.FilePath
|
||||
import System.IO.Temp
|
@ -1,6 +1,6 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
module Sandwich.Contexts.Util.Aeson where
|
||||
module Test.Sandwich.Contexts.Util.Aeson where
|
||||
|
||||
import qualified Data.Aeson as A
|
||||
import Data.Char
|
@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# OPTIONS_GHC -fno-warn-unused-top-binds #-}
|
||||
|
||||
module Sandwich.Contexts.Util.Container (
|
||||
module Test.Sandwich.Contexts.Util.Container (
|
||||
ContainerSystem (..)
|
||||
|
||||
, isInContainer
|
||||
@ -30,7 +30,7 @@ import qualified Data.Vector as V
|
||||
import Network.Socket (PortNumber)
|
||||
import Relude
|
||||
import Safe
|
||||
import Sandwich.Contexts.Util.Aeson
|
||||
import Test.Sandwich.Contexts.Util.Aeson
|
||||
import System.Exit
|
||||
import System.FilePath
|
||||
import Test.Sandwich
|
@ -1,5 +1,5 @@
|
||||
|
||||
module Sandwich.Contexts.Util.Exception where
|
||||
module Test.Sandwich.Contexts.Util.Exception where
|
||||
|
||||
import Control.Monad.IO.Unlift
|
||||
import Relude
|
@ -1,5 +1,5 @@
|
||||
|
||||
module Sandwich.Contexts.Util.Nix (
|
||||
module Test.Sandwich.Contexts.Util.Nix (
|
||||
withWritableBinaryCache
|
||||
) where
|
||||
|
@ -1,7 +1,7 @@
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
|
||||
|
||||
module Sandwich.Contexts.Util.Ports where
|
||||
module Test.Sandwich.Contexts.Util.Ports where
|
||||
|
||||
import Control.Monad.Catch (MonadCatch, catch)
|
||||
import Control.Retry
|
@ -1,4 +1,4 @@
|
||||
module Sandwich.Contexts.Util.SocketUtil (
|
||||
module Test.Sandwich.Contexts.Util.SocketUtil (
|
||||
isPortOpen
|
||||
, simpleSockAddr
|
||||
) where
|
@ -1,5 +1,5 @@
|
||||
|
||||
module Sandwich.Contexts.Util.UUID where
|
||||
module Test.Sandwich.Contexts.Util.UUID where
|
||||
|
||||
import qualified Data.List as L
|
||||
import Data.Text as T
|
@ -2,7 +2,7 @@
|
||||
{-# LANGUAGE ConstraintKinds #-}
|
||||
{-# LANGUAGE ViewPatterns #-}
|
||||
|
||||
module Sandwich.Contexts.Waits where
|
||||
module Test.Sandwich.Contexts.Waits where
|
||||
|
||||
import Control.Concurrent
|
||||
import Control.Monad
|
@ -33,13 +33,13 @@ ghc-options:
|
||||
library:
|
||||
source-dirs: lib
|
||||
exposed-modules:
|
||||
- Sandwich.Contexts.Container.PostgreSQL
|
||||
- Sandwich.Contexts.FakeSmtpServer
|
||||
- Sandwich.Contexts.Files
|
||||
- Sandwich.Contexts.MinIO
|
||||
- Sandwich.Contexts.Nix
|
||||
- Sandwich.Contexts.Nix.PostgreSQL
|
||||
- Sandwich.Contexts.Waits
|
||||
- Test.Sandwich.Contexts.Container.PostgreSQL
|
||||
- Test.Sandwich.Contexts.FakeSmtpServer
|
||||
- Test.Sandwich.Contexts.Files
|
||||
- Test.Sandwich.Contexts.MinIO
|
||||
- Test.Sandwich.Contexts.Nix
|
||||
- Test.Sandwich.Contexts.Nix.PostgreSQL
|
||||
- Test.Sandwich.Contexts.Waits
|
||||
dependencies:
|
||||
- aeson
|
||||
- bytestring
|
||||
|
@ -15,23 +15,23 @@ build-type: Simple
|
||||
|
||||
library
|
||||
exposed-modules:
|
||||
Sandwich.Contexts.Container.PostgreSQL
|
||||
Sandwich.Contexts.FakeSmtpServer
|
||||
Sandwich.Contexts.Files
|
||||
Sandwich.Contexts.MinIO
|
||||
Sandwich.Contexts.Nix
|
||||
Sandwich.Contexts.Nix.PostgreSQL
|
||||
Sandwich.Contexts.Waits
|
||||
Test.Sandwich.Contexts.Container.PostgreSQL
|
||||
Test.Sandwich.Contexts.FakeSmtpServer
|
||||
Test.Sandwich.Contexts.Files
|
||||
Test.Sandwich.Contexts.MinIO
|
||||
Test.Sandwich.Contexts.Nix
|
||||
Test.Sandwich.Contexts.Nix.PostgreSQL
|
||||
Test.Sandwich.Contexts.Waits
|
||||
other-modules:
|
||||
Sandwich.Contexts.FakeSmtpServer.Derivation
|
||||
Sandwich.Contexts.Nix.CaddyProxy
|
||||
Sandwich.Contexts.Util.Aeson
|
||||
Sandwich.Contexts.Util.Container
|
||||
Sandwich.Contexts.Util.Exception
|
||||
Sandwich.Contexts.Util.Nix
|
||||
Sandwich.Contexts.Util.Ports
|
||||
Sandwich.Contexts.Util.SocketUtil
|
||||
Sandwich.Contexts.Util.UUID
|
||||
Test.Sandwich.Contexts.FakeSmtpServer.Derivation
|
||||
Test.Sandwich.Contexts.Nix.CaddyProxy
|
||||
Test.Sandwich.Contexts.Util.Aeson
|
||||
Test.Sandwich.Contexts.Util.Container
|
||||
Test.Sandwich.Contexts.Util.Exception
|
||||
Test.Sandwich.Contexts.Util.Nix
|
||||
Test.Sandwich.Contexts.Util.Ports
|
||||
Test.Sandwich.Contexts.Util.SocketUtil
|
||||
Test.Sandwich.Contexts.Util.UUID
|
||||
Paths_sandwich_contexts
|
||||
hs-source-dirs:
|
||||
lib
|
||||
|
@ -1,6 +1,6 @@
|
||||
module Spec.Nix where
|
||||
|
||||
import Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import Data.String.Interpolate
|
||||
import Relude
|
||||
import System.FilePath
|
||||
|
@ -1,8 +1,8 @@
|
||||
|
||||
module Spec.NixContexts.PostgreSQL where
|
||||
|
||||
import Sandwich.Contexts.Nix
|
||||
import Sandwich.Contexts.Nix.PostgreSQL
|
||||
import Test.Sandwich.Contexts.Nix
|
||||
import Test.Sandwich.Contexts.Nix.PostgreSQL
|
||||
import Data.String.Interpolate
|
||||
import Database.PostgreSQL.Simple
|
||||
import Relude
|
||||
|
Loading…
Reference in New Issue
Block a user