diff options
Diffstat (limited to 'src/cli/test_anastasis_reducer_recovery_no_pay.sh')
-rwxr-xr-x | src/cli/test_anastasis_reducer_recovery_no_pay.sh | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/cli/test_anastasis_reducer_recovery_no_pay.sh b/src/cli/test_anastasis_reducer_recovery_no_pay.sh index a80b030..6a1ed0f 100755 --- a/src/cli/test_anastasis_reducer_recovery_no_pay.sh +++ b/src/cli/test_anastasis_reducer_recovery_no_pay.sh @@ -220,7 +220,6 @@ anastasis-reducer -a '{"provider_url" : "http://localhost:8086/" }' add_provider echo " OK" echo -n "Selecting secret to recover" -bash anastasis-reducer -a '{"version": 0, "mask": 0, "provider_url" : "http://localhost:8086/" }' next < $R1FILE > $R2FILE STATE=`jq -r -e .recovery_state < $R2FILE` @@ -230,6 +229,22 @@ then fi echo " OK" +echo -n "Synchronizing providers" +anastasis-reducer sync_providers < $R2FILE > $R1FILE +anastasis-reducer sync_providers < $R1FILE > $R2FILE +# This one will fail, as we should now have all 3 providers +# used by the policy in sync! +anastasis-reducer sync_providers < $R2FILE > $R1FILE 2> /dev/null || true +# Note: continue with $R2FILE, the last one that was valid! + +CODE=`jq -r -e .code < $R1FILE` +if test "$CODE" != "8400" +then + exit_fail "Expected to be synced, instead the code is '$CODE'" +fi +echo " OK" + + echo -n "Running challenge logic ..." UUID0=`jq -r -e .recovery_information.challenges[0].uuid < $R2FILE` |