File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,23 @@ spec = parallel $
228
228
[" --deposit-period" , " -1s" ] `shouldParse` defaultWithDepositPeriod (- 1 )
229
229
[" --deposit-period" , " 300s" ] `shouldParse` defaultWithDepositPeriod 300
230
230
231
+ it " parses --api-transaction-timeout option as a number of seconds" $ do
232
+ let defaultWithApiTransactionTimeout apiTransactionTimeout =
233
+ Run
234
+ defaultRunOptions
235
+ { apiTransactionTimeout
236
+ }
237
+ shouldNotParse [" --api-transaction-timeout" , " 3" ]
238
+ shouldNotParse [" --api-transaction-timeout" , " 1.5" ]
239
+ shouldNotParse [" --api-transaction-timeout" , " abc" ]
240
+ shouldNotParse [" --api-transaction-timeout" , " s" ]
241
+ shouldNotParse [" --api-transaction-timeout" , " -1" ]
242
+ -- shouldNotParse ["--api-transaction-timeout", "-1s"]
243
+ [" --api-transaction-timeout" , " 0s" ] `shouldParse` defaultWithApiTransactionTimeout 0
244
+ [" --api-transaction-timeout" , " 1s" ] `shouldParse` defaultWithApiTransactionTimeout 1
245
+ [" --api-transaction-timeout" , " -1s" ] `shouldParse` defaultWithApiTransactionTimeout (- 1 )
246
+ [" --api-transaction-timeout" , " 300s" ] `shouldParse` defaultWithApiTransactionTimeout 300
247
+
231
248
it " parses --mainnet flag" $ do
232
249
[" --mainnet" ]
233
250
`shouldParse` Run
You can’t perform that action at this time.
0 commit comments