-
Notifications
You must be signed in to change notification settings - Fork 217
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
More integration tests for CLI (including minor fixes in CLI) #278
Conversation
if (title == "40 chars hex") then | ||
c `shouldBe` ExitSuccess | ||
else | ||
c `shouldBe` ExitFailure 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is slightly inconsistent I think. I suppose the response code should be always 1
(currently for valid hex, but not existing wallet it is 0
, for others it is 1
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... That's actually right.
…ays meaningful in case of invalid --size
- moving test data to separate module TestData.hs - extracting methods for interacting with CLI to DSL - few more test cases
9b8ebba
to
9935f7c
Compare
"15" -> mnemonicToText @15 . entropyToMnemonic <$> genEntropy | ||
"18" -> mnemonicToText @18 . entropyToMnemonic <$> genEntropy | ||
"21" -> mnemonicToText @21 . entropyToMnemonic <$> genEntropy | ||
"24" -> mnemonicToText @24 . entropyToMnemonic <$> genEntropy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet :o
hPutStr i (passphrase ++ "\n") | ||
hPutStr i (passphrase ++ "\n") | ||
hFlush i | ||
hClose i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My man ❤️
{ std_in = CreatePipe, std_out = CreatePipe, std_err = CreatePipe } | ||
withCreateProcess process $ \stdIn _ _ h -> do | ||
case stdIn of | ||
Nothing -> return () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should "throw". Since we use CreatePipe
this must be Just
. If not, the test might hang forever.
if (title == "40 chars hex") then | ||
c `shouldBe` ExitSuccess | ||
else | ||
c `shouldBe` ExitFailure 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... That's actually right.
Issue Number
#96
Overview
cardano-wallet-launcher
andcardano-wallet
for both parameters (--help
and-h
)mnemonic generate
to always showInvalid mnemonic size. Expected one of: 9,12,15,18,21,24
for invalid--size
(it used to show rather unpleasentInt is an integer number between -9223372036854775808 and 9223372036854775807.
when the provided--size
was not Int)TestData.hs
and extracting methods for interacting with CLI toDSL.hs
)Comments