diff options
-rwxr-xr-x | src/cli/test_iban.sh | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/cli/test_iban.sh b/src/cli/test_iban.sh index 772b1c0..a46edaa 100755 --- a/src/cli/test_iban.sh +++ b/src/cli/test_iban.sh @@ -418,6 +418,10 @@ then exit_fail "Expected account to be ${IBAN_CREDIT}, got ${ACC}" fi +anastasis-reducer \ + back < $R1FILE > $R2FILE 2>> test_reducer.err + + AMOUNT=`jq -r -e .challenge_feedback.\"$NAME_UUID\".details.challenge_amount < $R1FILE` SUBJECT=`jq -r -e .challenge_feedback.\"$NAME_UUID\".details.wire_transfer_subject < $R1FILE` @@ -432,30 +436,30 @@ echo " OK" # Now we should get the secret... echo -n "Polling for recovery ..." -anastasis-reducer poll < $R1FILE > $R2FILE +anastasis-reducer poll < $R2FILE > $R1FILE echo " OK" echo -n "Checking recovered secret ..." # finally: check here that we recovered the secret... -STATE=`jq -r -e .recovery_state < $R2FILE` +STATE=`jq -r -e .recovery_state < $R1FILE` if test "$STATE" != "RECOVERY_FINISHED" then - jq -e . $R2FILE + jq -e . $R1FILE exit_fail "Expected new state to be 'RECOVERY_FINISHED', got '$STATE'" fi -SECRET=`jq -r -e .core_secret.value < $R2FILE` +SECRET=`jq -r -e .core_secret.value < $R1FILE` if test "$SECRET" != "VERYHARDT0GVESSSECRET" then - jq -e . $R2FILE + jq -e . $R1FILE exit_fail "Expected recovered secret to be 'VERYHARDT0GVESSSECRET', got '$SECRET'" fi -MIME=`jq -r -e .core_secret.mime < $R2FILE` +MIME=`jq -r -e .core_secret.mime < $R1FILE` if test "$MIME" != "text/plain" then - jq -e . $R2FILE + jq -e . $R1FILE exit_fail "Expected recovered mime to be 'text/plain', got '$MIME'" fi |