Commit a5d861e1 authored by Valentin Reis's avatar Valentin Reis

Adding power test.

parent 7bfb82a8
Pipeline #4827 failed with stage
in 8 seconds
......@@ -42,6 +42,7 @@ opts sa = hsubparser
<> commandTest TestHello
<> commandTest TestListen
<> commandTest TestPerfwrapper
<> commandTest TestPower
<> commandTests [TestHello, TestListen, TestPerfwrapper]
"tests"
"Run all tests"
......@@ -58,7 +59,7 @@ opts sa = hsubparser
command (show ttype) $ info (action ttype) (progDesc $ descTest ttype)
commandTests ttypes cmdStr descStr = command cmdStr $ info (pure $ mapM_ (doTest sa) ttypes) (progDesc descStr)
data TestType = TestHello | TestListen | TestPerfwrapper deriving Show
data TestType = TestHello | TestListen | TestPerfwrapper | TestPower deriving Show
data TestSpec = TestSpec {
stackAction :: StackArgs -> Shell ()
, stackArgsUpdate :: StackArgs -> StackArgs
......@@ -113,6 +114,17 @@ configureTest = \case
\ at least one *performance* message to cmd listen through the\
\ daemon."
}
TestPower -> TestSpec
{ stackAction = listenStack
, stackArgsUpdate = \sa -> sa { app = "sleep"
, args = ["15"]
, messageCmdListenOut = Just "power"
, messageCmdListenErr = Just "power"
}
, description = "4: Setup stack and check that argo-perf-wrapper sends\
\ at least one *power* message to cmd listen through the\
\ daemon."
}
where msg = "someComplicatedMessage"
simpleStack :: Bool -> StackArgs -> Shell ()
......
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