Add --dry-run switch to graphql-engine:test:tests-dc-api [GDW-338]

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5847
GitOrigin-RevId: 97011a617f0a305109f6f8d29293a4898e0bac10
This commit is contained in:
Lyndon Maydwell 2022-09-14 16:26:13 +10:00 committed by hasura-bot
parent ee995aacc1
commit 2ef11a4766
2 changed files with 8 additions and 2 deletions

View File

@ -36,7 +36,8 @@ data TestOptions = TestOptions
_toAgentCapabilities :: AgentCapabilities, _toAgentCapabilities :: AgentCapabilities,
_toParallelDegree :: Maybe Int, _toParallelDegree :: Maybe Int,
_toMatch :: Maybe String, _toMatch :: Maybe String,
_toSkip :: Maybe String _toSkip :: Maybe String,
_toDryRun :: Bool
} }
data AgentCapabilities data AgentCapabilities
@ -135,6 +136,10 @@ testOptionsParser =
<> help "Skip tests that match given PATTERN" <> help "Skip tests that match given PATTERN"
) )
) )
<*> switch
( long "dry-run"
<> help "Skip execution of test bodies"
)
testCommandParser :: Parser Command testCommandParser :: Parser Command
testCommandParser = Test <$> testOptionsParser testCommandParser = Test <$> testOptionsParser

View File

@ -69,5 +69,6 @@ applyTestConfig config TestOptions {..} =
config config
{ configConcurrentJobs = _toParallelDegree, { configConcurrentJobs = _toParallelDegree,
configFilterPredicate = filterPredicate <$> _toMatch, configFilterPredicate = filterPredicate <$> _toMatch,
configSkipPredicate = filterPredicate <$> _toSkip configSkipPredicate = filterPredicate <$> _toSkip,
configDryRun = _toDryRun
} }