summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-26 16:57:17 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-26 16:57:17 +0200
commit754f693c335cc4217b48fd15978cc55c25f9cc78 (patch)
treef5df18b53a6d65aef13e8dd70bc3e952fc118438 /src
parent563238c037e7ccf1cf5dfcefc125ba5f23ee0eb6 (diff)
downloadanastasis-754f693c335cc4217b48fd15978cc55c25f9cc78.tar.gz
anastasis-754f693c335cc4217b48fd15978cc55c25f9cc78.tar.bz2
anastasis-754f693c335cc4217b48fd15978cc55c25f9cc78.zip
-fix script to match new state machine
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cli/test_iban.sh18
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