-
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
Wallet update passphrase integration tests #261
Conversation
…d}` and `PUT v2/wallets/{wallet-id}/passphrase`)
if (title == "40 chars hex") then | ||
expectResponseCode @IO HTTP.status403 rup | ||
else | ||
expectResponseCode @IO HTTP.status404 rup |
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.
There is a slight inconsistency in the behavior: There is 403
being returned in case when {wallet-id}
is a 40 char long hex encoded string (ofc, for the wallet that does not exist). For any other string it returns 404
(e.g. longer/shorter than 40 chars, 40 char length but not valid hex).
I think I'd be expecting either 404
for all. Or 400
for not valid IDs and 404
for valid and not existing (but this cannot be achieved now #252 (comment))
Not sure if this is something that can be addressed.
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... Probably has to do with the way we map the error when a root private key can't be found. I'll have a look at it.
} |] | ||
r <- request @ApiWallet ctx ("POST", "v2/wallets") Default createPayload | ||
let payload = updatePassPayload oldPass | ||
(T.pack (replicate passphraseMaxLength '💘')) |
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.
Love it.
Issue Number
Overview
PUT v2/wallets/{wallet-id}/passphrase
to be inline with API spec (204
)410
code from the API spec forPUT v2/wallets/{wallet-id}
andPUT v2/wallets/{wallet-id}/passphrase
as it seems it currently cannot be producedComments