[tests] some more tests refactoring

parent b4bd2596
Pipeline #6945 passed with stages
in 53 minutes and 36 seconds
......@@ -35,7 +35,7 @@ cannedToken :: T.Text
cannedToken = "eyJhbGciOiJIUzUxMiJ9.eyJkYXQiOnsiaWQiOjF9fQ.t49zZSqkPAulEkYEh4pW17H2uwrkyPTdZKwHyG3KUJ0hzU2UUoPBNj8vdv087RCVBJ4tXgxNbP4j0RBv3gxdqg"
tests :: Spec
tests = sequential $ aroundAll withTestDBAndPort $ beforeAllWith (\ctx -> setupEnvironment (_sctx_env ctx) >>= (const $ pure ctx)) $ do
tests = parallel $ aroundAll withTestDBAndPort $ beforeAllWith (\ctx -> setupEnvironment (_sctx_env ctx) >>= (const $ pure ctx)) $ do
describe "Authentication" $ do
baseUrl <- runIO $ parseBaseUrl "http://localhost"
manager <- runIO $ newManager defaultManagerSettings
......
......@@ -24,7 +24,7 @@ import Text.RawString.QQ (r)
tests :: Spec
tests = sequential $ aroundAll withTestDBAndPort $ beforeAllWith dbEnvSetup $ do
tests = parallel $ aroundAll withTestDBAndPort $ beforeAllWith dbEnvSetup $ do
describe "Errors API" $ do
describe "Prelude" $ do
it "setup DB triggers and users" $ \ctx -> do
......
......@@ -18,7 +18,7 @@ import Test.Utils (protected, protectedNewError, shouldRespondWithFragment, shou
import Text.RawString.QQ (r)
tests :: Spec
tests = sequential $ aroundAll withTestDBAndPort $ beforeAllWith dbEnvSetup $ do
tests = parallel $ aroundAll withTestDBAndPort $ beforeAllWith dbEnvSetup $ do
describe "GraphQL" $ do
describe "get_user_infos" $ do
it "allows 'alice' to see her own info" $ \(SpecContext testEnv port app _) -> do
......
......@@ -41,7 +41,7 @@ shareURL token =
& shareUrlEp
tests :: Spec
tests = sequential $ aroundAll withTestDBAndPort $ beforeAllWith dbEnvSetup $ do
tests = parallel $ aroundAll withTestDBAndPort $ beforeAllWith dbEnvSetup $ do
describe "Prelude" $ do
it "should fail if no node type is specified" $ \(SpecContext _testEnv serverPort app _) -> do
withApplication app $ do
......
......@@ -26,7 +26,7 @@ tests = describe "Microservices proxy" $ do
writeFrameTests
writeFrameTests :: Spec
writeFrameTests = sequential $ aroundAll withBackendServerAndProxy $ beforeAllWith (\ctx@(testEnv, _, _) -> setupEnvironment testEnv >>= (const $ pure ctx)) $ do
writeFrameTests = parallel $ aroundAll withBackendServerAndProxy $ beforeAllWith (\ctx@(testEnv, _, _) -> setupEnvironment testEnv >>= (const $ pure ctx)) $ do
describe "Write Frame Reverse Proxy" $ do
it "should disallow unauthenticated requests" $ \(_testEnv, _serverPort, proxyPort) -> do
baseUrl <- parseBaseUrl "http://localhost"
......
......@@ -248,7 +248,7 @@ pollUntilWorkFinished :: HasCallStack
-> JobInfo
-> WaiSession () JobInfo
pollUntilWorkFinished tkn port ji = do
let waitSecs = 10
let waitSecs = 30
isFinishedTVar <- liftIO $ newTVarIO False
let wsConnect =
withWSConnection ("127.0.0.1", port) $ \conn -> do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment