mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
tests/taler: fix currency withdrawal confirmation
This commit is contained in:
parent
c1fe104a77
commit
b24910bccf
1 changed files with 6 additions and 1 deletions
|
@ -189,11 +189,16 @@ import ../../make-test-python.nix (
|
||||||
|
|
||||||
# Accept & confirm withdrawal
|
# Accept & confirm withdrawal
|
||||||
with subtest("Accept & confirm withdrawal"):
|
with subtest("Accept & confirm withdrawal"):
|
||||||
wallet_cli(f"withdraw accept-uri {withdrawal["taler_withdraw_uri"]} --exchange http://exchange:8081/")
|
# the withdrawal can only be confirmed if this is executed twice, for some reason
|
||||||
|
for i in range(2):
|
||||||
|
wallet_cli(f"withdraw accept-uri {withdrawal["taler_withdraw_uri"]} --exchange 'http://exchange:8081/'")
|
||||||
|
client.sleep(5) # needs some time to process things
|
||||||
|
|
||||||
succeed(client, [
|
succeed(client, [
|
||||||
"curl -X POST",
|
"curl -X POST",
|
||||||
f"-H 'Authorization: Bearer {accessTokenUser}'",
|
f"-H 'Authorization: Bearer {accessTokenUser}'",
|
||||||
"-H 'Content-Type: application/json'",
|
"-H 'Content-Type: application/json'",
|
||||||
|
f"""--data '{{"amount": "{balanceWanted}"}}'""", # double brackets escapes them
|
||||||
f"-sSfL 'http://bank:8082/accounts/${TUSER}/withdrawals/{withdrawal["withdrawal_id"]}/confirm'"
|
f"-sSfL 'http://bank:8082/accounts/${TUSER}/withdrawals/{withdrawal["withdrawal_id"]}/confirm'"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue