Skip to content

Commit

Permalink
Fix failed CLI tests
Browse files Browse the repository at this point in the history
Change execution order of instance:export commands during CLI testing
  • Loading branch information
tobiaslohr authored Apr 7, 2020
1 parent f875514 commit 9d26c61
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions bin/test-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -885,26 +885,26 @@ fi
###### Testing ´sfcc-ci instance:export´
###############################################################################

echo "Testing command ´sfcc-ci instance:export´:"
node ./cli.js instance:export --instance $ARG_HOST --data '{"global_data":{"meta_data":true}}' --file test_export_async.zip
echo "Testing command ´sfcc-ci instance:export´ with --sync flag:"
node ./cli.js instance:export --instance $ARG_HOST --data '{"global_data":{"meta_data":true}}' --file test_export_sync.zip --sync
if [ $? -eq 0 ]; then
echo -e "\t> OK"
else
echo -e "\t> FAILED"
exit 1
fi

echo "Testing command ´sfcc-ci instance:export´ with --sync flag:"
node ./cli.js instance:export --instance $ARG_HOST --data '{"global_data":{"meta_data":true}}' --file test_export_sync.zip --sync
if [ $? -eq 0 ]; then
echo "Testing command ´sfcc-ci instance:export´ with --sync and --failfast flag (expected to fail):"
node ./cli.js instance:export --instance $ARG_HOST --data '{"global_data":{"meta_data":true},"does_not_exis":true}}' --file test_export_sync.zip --sync --failfast
if [ $? -eq 1 ]; then
echo -e "\t> OK"
else
echo -e "\t> FAILED"
exit 1
fi

echo "Testing command ´sfcc-ci instance:export´ with --failfast flag (expected to fail):"
node ./cli.js instance:export --instance $ARG_HOST --data '{"global_data":{"meta_data":true}}' --file test_export_sync.zip --failfast
echo "Testing command ´sfcc-ci instance:export´ without --sync flag:"
node ./cli.js instance:export --instance $ARG_HOST --data '{"global_data":{"meta_data":true}}' --file test_export_async.zip
if [ $? -eq 1 ]; then
echo -e "\t> OK"
else
Expand Down Expand Up @@ -997,4 +997,4 @@ if [ $? -eq 1 ]; then
else
echo -e "\t> FAILED"
exit 1
fi
fi

0 comments on commit 9d26c61

Please sign in to comment.