-
Notifications
You must be signed in to change notification settings - Fork 17
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
[DPC-4427] Fetch bearer token for load testing #2356
Conversation
Makefile
Outdated
@@ -112,7 +112,7 @@ start-portals: start-db start-web start-admin start-portal | |||
|
|||
start-load-tests: ## Run DPC performance tests locally in a Docker image provided by Grafana/K6 | |||
start-load-tests: | |||
@docker run --rm -i grafana/k6 run - <./dpc-load-testing/script.js | |||
@docker run --rm -v $(shell pwd)/dpc-load-testing:/src --env-file $(shell pwd)/dpc-load-testing/.env -i grafana/k6 run /src/script.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could store in ansible then
maybe change to
-e CLIENT_TOKEN=$LOAD_TEST_TOKEN ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Makefile has no way to understand what $LOAD_TEST_TOKEN should be coming from. This whole thing isn't defined in a docker-compose.yml, but rather, it's run in grafana's own docker image.
As a result, I had to point --env-file at the decrypted env.local.
…ct the need for specificity in ansible vault
@jdettmannnava updated to use ansible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Eventually we will probably want to be able to choose the environment to run against (for example, run against local api vs dev vs test), but that seems to be outside the scope of this ticket.
🎫 Ticket
https://jira.cms.gov/browse/DPC-4427
🛠 Changes
ℹ️ Context
In order to enable load testing the DPC API, we need an organization in the test environment that can authenticate. This PR validates that this new organization is functional; it relies on the organization's client token, public key ID, and RSA private key, which are stored in secrets, and accessed by the GitHub Actions workflow in question.
🧪 Validation