Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve smoke tests dev experience #1767

Merged
merged 1 commit into from
Mar 26, 2021
Merged

Improve smoke tests dev experience #1767

merged 1 commit into from
Mar 26, 2021

Conversation

JackuB
Copy link
Contributor

@JackuB JackuB commented Mar 25, 2021

Updates the ad hoc experience of running smoke tests locally

Checkout the readme changes: https://github.com/snyk/snyk/blob/smoke/improve-shellspec/test/smoke/README.md

@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2021

Messages
📖

This PR will not trigger a new version. It doesn't include any commit message with feat or fix.

Generated by 🚫 dangerJS against 9002fcc

@JackuB JackuB force-pushed the smoke/improve-shellspec branch 4 times, most recently from b80363e to ca471d5 Compare March 25, 2021 16:43
@JackuB JackuB marked this pull request as ready for review March 25, 2021 20:12
@JackuB JackuB requested review from a team as code owners March 25, 2021 20:12
exit 1
fi
echo "Installing shellspec with brew"
brew install shellspec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is mac specific, do we plan on making linux/windows scripts later on?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've looked into that, but I gave up

███████╗██╔████╔██║██║ ██║█████╔╝ █████╗ ██║ █████╗ ███████╗ ██║ ███████╗
╚════██║██║╚██╔╝██║██║ ██║██╔═██╗ ██╔══╝ ██║ ██╔══╝ ╚════██║ ██║ ╚════██║
███████║██║ ╚═╝ ██║╚██████╔╝██║ ██╗███████╗ ██║ ███████╗███████║ ██║ ███████║
╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚══════╝╚══════╝ ╚═╝ ╚══════╝
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fancy

test/smoke/README.md Outdated Show resolved Hide resolved
test/smoke/README.md Outdated Show resolved Hide resolved
#!/usr/bin/env bash
set -e

echo "Attempting to run Smoke Tests locally. See file 'test/smoke/README.md' for details. This will drop your local 'snyk config'!"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make a back up of the local config file (if it exists) before proceeding?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gets complicated in guessing the config location - would be a bit easier if snyk config would have a command to let you know which config it is using

test/smoke/README.md Outdated Show resolved Hide resolved
@@ -2,11 +2,10 @@

echo "install snyk with binary"
snyk_cli_dl=$(curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/snyk/snyk/releases/latest | jq --raw-output '(.assets[])? | select(.name == "snyk-alpine") | .browser_download_url')
echo "snyk_cli_dl: ${snyk_cli_dl}"
curl -Lo ./snyk-cli $snyk_cli_dl
echo "snyk_cli_dl: $snyk_cli_dl"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have thought you'd want the { / }.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need (or want?) the parameter expansion {} if you are just printing it afaik

@JackuB JackuB merged commit e5d2de7 into master Mar 26, 2021
@JackuB JackuB deleted the smoke/improve-shellspec branch March 26, 2021 13:04
@JackuB
Copy link
Contributor Author

JackuB commented Mar 26, 2021

Merging, as it'll allow me to open another PR that will speed up the builds and allow better testing for monorepo cases such as #1707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants