packages feed

hasql-2.2.0.0 / src / library-tests / Integration / Sharing / SpecHook.hs

-- Docs: https://hspec.github.io/hspec-discover.htmlmodule Integration.Sharing.SpecHook whereimport Helpers.PostgresContainer qualified as PostgresContainerimport Helpers.Scripts qualified as Scriptsimport Pqi qualifiedimport Preludeimport Test.Hspecimport TestcontainersPostgresql qualifiedtype HookedSpec = SpecWith Scripts.ScopeParamshook :: HookedSpec -> SpecWith Pqi.Adapterhook hookedSpec = do  byDistro "postgres:9"  byDistro "postgres:18"  where    byDistro tagName =      describe (toList tagName)        $ aroundAllWith          ( \action adapter ->              PostgresContainer.run                TestcontainersPostgresql.Config                  { tagName,                    auth = TestcontainersPostgresql.CredentialsAuth "postgres" "postgres",                    forwardLogs = False                  }                (\(host, port) -> action (adapter, host, port))          )          (parallel hookedSpec)