Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(test): remove "be able to" from tests #3

Merged
merged 1 commit into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/Test/Entrypoint.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Test.Utils (mkAffContainer)

entrypointTest :: Spec Unit
entrypointTest = describe "Test Entrypoint" $ do
it "should be able to override the entrypoint" $ do
it "should override the entrypoint" $ do
sleeper <- mkAffContainer "alpine:latest" $
setEntrypoint [ "/docker-entrypoint.sh" ]
<<< setCommand [ "30" ]
Expand Down
6 changes: 3 additions & 3 deletions test/Test/Network.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Test.Utils (launchCommand, mkAffContainer)
networkTest :: Spec Unit
networkTest = do
describe "Network creation" $ do
it "should be able to create a network" $ do
it "should create a network" $ do
startedNetwork <- startNetwork mkNetwork
case startedNetwork of
Left err -> fail err
Expand All @@ -38,7 +38,7 @@ networkTest = do
realId `shouldSatisfy` ((/=) "")

describe "Network utilisation" $ do
it "should be able to define extra hosts" $ do
it "should define extra hosts" $ do
alpine <- mkAffContainer "alpine:latest" $
setCommand [ "sleep", "infinity" ]
<<< setExtraHosts
Expand All @@ -59,7 +59,7 @@ networkTest = do
Left err -> fail err
Right _ -> pure unit

it "should be able to use a network" $ do
it "should use a network" $ do
commonNetwork <- startNetwork mkNetwork
case commonNetwork of
Left e -> fail e
Expand Down
4 changes: 2 additions & 2 deletions test/Test/NetworkMode.purs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Test.Utils (mkAffContainer)

networkModeTest :: Spec Unit
networkModeTest = describe "Network Mode" $ do
it "should be able to set bridge network mode" $ do
it "should set bridge network mode" $ do
cnt <- mkAffContainer "alpine:latest" $
setNetworkMode (NetworkMode "bridge")
<<< setCommand [ "sleep", "infinity" ]
Expand All @@ -24,7 +24,7 @@ networkModeTest = describe "Network Mode" $ do
Left e -> throwError $ error e
Right _ -> pure unit

it "should be able to set host network mode" $ do
it "should set host network mode" $ do
cnt <- mkAffContainer "alpine:latest" $
setNetworkMode (NetworkMode "host")
<<< setCommand [ "sleep", "infinity" ]
Expand Down
4 changes: 2 additions & 2 deletions test/Test/Ports.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Test.Utils (launchCommand)
portMappingTest :: Spec Unit
portMappingTest = do
describe "Port Mappings" $ do
it "should be able to map ports" $ do
it "should map ports" $ do
let
nginx = mkContainer "nginx:alpine" # configure $ do
setExposedPortsM [ 80 ]
Expand All @@ -39,7 +39,7 @@ portMappingTest = do
(\s -> s `shouldEqual` "root\n")
(\code -> code `shouldEqual` 0)

it "should be able to map multiple ports" $ do
it "should map multiple ports" $ do
let
redis = mkContainer "redis:latest" # configure $ do
setExposedPortsM [ 6379, 6270 ]
Expand Down
10 changes: 5 additions & 5 deletions test/Test/WaitStrategy.purs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ waitStrategyTest :: Spec Unit
waitStrategyTest = describe "Wait Strategies" $ do

describe "Log Based" $ do
it "should be able to wait for a line of log to appear twice" $ do
it "should wait for a line of log to appear twice" $ do
psql <- mkAffContainerM "postgres:14-alpine" $ do
setEnvironmentM psqlEnv

Expand All @@ -43,7 +43,7 @@ waitStrategyTest = describe "Wait Strategies" $ do
Left e -> throwError $ error e
Right _ -> pure unit

it "should be able to wait for a certain amount of time" $ do
it "should wait for a certain amount of time" $ do
rightNow <- liftEffect now
sleeper <- mkAffContainerM "alpine:latest" $ do
setCommandM [ "sleep", "360" ]
Expand All @@ -65,7 +65,7 @@ waitStrategyTest = describe "Wait Strategies" $ do
Right _ -> throwError $ error "I was expecting an error!"

describe "HTTP Based" $ do
it "should be able to wait for an http code" $ do
it "should wait for an http code" $ do
rightNow <- liftEffect now
nginx <- mkAffContainer "nginx:latest" $
-- For HttpStatusCode to work we have to expose that port
Expand All @@ -81,7 +81,7 @@ waitStrategyTest = describe "Wait Strategies" $ do
Left e -> throwError $ error e
Right _ -> pure unit

it "should be able to parse the body of an http request" $ do
it "should parse the body of an http request" $ do
rightNow <- liftEffect now
nginx <- mkAffContainer "nginx:latest" $
setWaitStrategy [ HttpResponsePredicate "/" 80 checkHttpBody ]
Expand All @@ -97,7 +97,7 @@ waitStrategyTest = describe "Wait Strategies" $ do
Right _ -> pure unit

describe "Shell commands" $ do
it "should be able to wait for a shell command output" $ do
it "should wait for a shell command output" $ do
rightNow <- liftEffect now
sleeper <- mkAffContainer "alpine:latest" $
setWaitStrategy [ ShellCommand "sleep 3" ]
Expand Down