diff options
Diffstat (limited to 'src/cli/test_anastasis_reducer_select_country.sh')
-rwxr-xr-x | src/cli/test_anastasis_reducer_select_country.sh | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/cli/test_anastasis_reducer_select_country.sh b/src/cli/test_anastasis_reducer_select_country.sh index c02f61f..2e18f44 100755 --- a/src/cli/test_anastasis_reducer_select_country.sh +++ b/src/cli/test_anastasis_reducer_select_country.sh @@ -63,12 +63,11 @@ jq -e .countries[0] < $TFILE > /dev/null || exit_fail "Expected new state to inc jq -e .countries[0].code < $TFILE > /dev/null || exit_fail "Expected new state to include countries with code" jq -e .countries[0].continent < $TFILE > /dev/null || exit_fail "Expected new state to include countries with continent" jq -e .countries[0].name < $TFILE > /dev/null || exit_fail "Expected new state to include countries with name" -jq -e .countries[0].currency < $TFILE > /dev/null || exit_fail "Expected new state to include countries with currency" SELECTED_CONTINENT=`jq -r -e .selected_continent < $TFILE` if test "$SELECTED_CONTINENT" != "Europe" then - exit_fail "Expected selected continent to be 'Testcontinent', got $SELECTED_CONTINENT" + exit_fail "Expected selected continent to be 'Europe', got $SELECTED_CONTINENT" fi echo " OK" @@ -84,8 +83,7 @@ echo " OK" echo -n "Test NX country selection ..." anastasis-reducer -a \ - '{"country_code": "zz", - "currencies": ["EUR" ]}' \ + '{"country_code": "zz"}' \ select_country \ resources/01-backup.json $TFILE 2> /dev/null \ && exit_fail "Expected selection to fail. Check '$TFILE'" @@ -95,8 +93,7 @@ echo " OK" echo -n "Test invalid country selection for continent ..." anastasis-reducer -a \ - '{"country_code": "de", - "currencies":["EUR"]}' \ + '{"country_code": "de"}' \ select_country \ resources/01-backup.json $TFILE 2> /dev/null \ && exit_fail "Expected selection to fail. Check '$TFILE'" @@ -106,8 +103,7 @@ echo " OK" echo -n "Test country selection ..." anastasis-reducer -a \ - '{"country_code": "xx", - "currencies":["TESTKUDOS"]}' \ + '{"country_code": "xx"}' \ select_country resources/01-backup.json $TFILE STATE=`jq -r -e .backup_state < $TFILE` @@ -122,12 +118,6 @@ then exit_fail "Expected selected country to be 'xx', got '$SELECTED_COUNTRY'" fi echo -n "." -SELECTED_CURRENCY=`jq -r -e .currencies[0] < $TFILE` -if test "$SELECTED_CURRENCY" != "TESTKUDOS" -then - exit_fail "Expected selected currency to be 'TESTKUDOS', got '$SELECTED_CURRENCY'" -fi -echo -n "." REQ_ATTRIBUTES=`jq -r -e .required_attributes < $TFILE` if test "$REQ_ATTRIBUTES" == NULL then |