diff options
Diffstat (limited to 'src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh')
-rwxr-xr-x | src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh index 3a62704..10799e6 100755 --- a/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh +++ b/src/cli/test_anastasis_reducer_recovery_enter_user_attributes.sh @@ -437,20 +437,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! +# Sync with providers (up to 3 providers aren't synced here) +for x in 1 2 3; do + echo "Synchronizing providers (round $x)" + anastasis-reducer sync_providers < $R2FILE > $R1FILE 2> /dev/null || true + CODE=$(jq -r -e ".code // 0" < $R1FILE) + if test "$CODE" = "8420"; then + break + fi + if test "$CODE" != "0"; then + exit_fail "Expected no error or 8420, got $CODE" + fi + cat $R1FILE > $R2FILE +done 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 "Providers synced." echo -n "Running challenge logic ..." |