Skip to content

Commit

Permalink
test: fix broken test
Browse files Browse the repository at this point in the history
test: fix broken test
  • Loading branch information
Avishag Israeli committed Feb 22, 2021
1 parent 3775fcd commit 629d571
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/smoke/spec/snyk_auth_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Describe "Snyk CLI Authorization"

# Using timeout to not wait for browser confirmation
When run timeout 5 snyk auth
The output should include "To authenticate your account, open the below URL in your browser."
The result of function check_auth_output should be success
The result of function verify_login_url should include "snyk.io/login?token=" # URL found
The status should be failure
# TODO: unusable with our current docker issues
Expand Down
5 changes: 5 additions & 0 deletions test/smoke/spec/spec_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ restore_is_ci_flags() {
}

check_if_regression_test() { ! [ "${REGRESSION_TEST}" = "1" ]; }

check_auth_output() {
printf %s "$1" | grep -F -e "To authenticate your account, open the below URL in your browser." -e "Now redirecting you to our auth page, go ahead and log in," > /dev/null
echo $?
}

0 comments on commit 629d571

Please sign in to comment.