Skip to content

Commit

Permalink
chore: persist SNYK_API in CCI config (#5018)
Browse files Browse the repository at this point in the history
* chore: persist SNYK_API and key in CCI config

Persist SNYK_API and SNYK_API_KEY value in CircleCI to enable configuring this value later.

* test: relax match to accommodate broader set of instances

---------

Co-authored-by: Luke Watts <luke@snyk.io>
  • Loading branch information
Avishagp and thisislawatts authored Jan 26, 2024
1 parent e7b8f85 commit 279677a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,6 @@ jobs:
working_directory: ./test/smoke
command: |
echo "Checkout the README in test/smoke folder for more details about this step"
unset SNYK_API
unset SNYK_API_KEY
shellspec -f d -e REGRESSION_TEST=1 -e PIP_BREAK_SYSTEM_PACKAGES=1
sign:
Expand Down
6 changes: 3 additions & 3 deletions test/smoke/spec/snyk_monitor_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ Describe "Snyk monitor command"
It "monitors a project in the same folder"
When run run_monitor_in_subfolder
The status should be success
The output should include "Explore this snapshot at https://app.snyk.io/org/"
The output should include "Explore this snapshot at https://app.eu.snyk.io/org/"
The output should include "Notifications about newly disclosed issues related to these dependencies will be emailed to you."
End

It "monitors a project when pointing to a folder"
When run snyk monitor ../fixtures/basic-npm
The status should be success
The output should include "Explore this snapshot at https://app.snyk.io/org/"
The output should include "Explore this snapshot at https://app.eu.snyk.io/org/"
The output should include "Notifications about newly disclosed issues related to these dependencies will be emailed to you."
End

It "monitors a project when pointing to a file"
When run snyk monitor --file=../fixtures/basic-npm/package.json
The status should be success
The output should include "Explore this snapshot at https://app.snyk.io/org/"
The output should include "Explore this snapshot at https://app.eu.snyk.io/org/"
The output should include "Notifications about newly disclosed issues related to these dependencies will be emailed to you."
End
End
Expand Down
2 changes: 1 addition & 1 deletion test/smoke/spec/spec_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec_helper_configure() {

verify_login_url() {
# https://snyk.io/login?token=uuid-token&utm_medium=cli&utm_source=cli&utm_campaign=cli&os=darwin&docker=false
echo "$1" | grep https | grep -E "^https://(app\.)?(dev\.)?(test\.)?snyk\.io/login\?token=[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\&.*$"
echo "$1" | grep https | grep -E "snyk\.io/login\?token=[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\&.*$"
}

# Consume stdout and checks validates whether it's a valid JSON
Expand Down

0 comments on commit 279677a

Please sign in to comment.