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

local smoke tests #1923

Merged
merged 8 commits into from
May 6, 2024
Merged

local smoke tests #1923

merged 8 commits into from
May 6, 2024

Conversation

sastels
Copy link
Collaborator

@sastels sastels commented Jul 7, 2023

Summary | Résumé

add smoke testing local api.

  • set up your .env_smoke_local to send yourself emails
  • the smoke-local alias will send the emails / texts but not verify success (since we don't run the delivery callbacks locally)
  • default setup is to not send file attachments, though you can modify the Makefile to send those locally as well (we typically don't worry about testing them locally unless we're messing around with document-download-api)

Test instructions | Instructions pour tester la modification

  • rebuild your dev container
  • set up a .env_smoke_local file
  • make run and make run-celery-local-filtered
  • run the alias smoke-local

@sastels sastels marked this pull request as ready for review July 7, 2023 21:41
@sastels sastels marked this pull request as draft July 11, 2023 20:37
@sastels sastels marked this pull request as ready for review May 2, 2024 18:30
Copy link
Contributor

@ben851 ben851 left a comment

Choose a reason for hiding this comment

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

LGTM - I was hoping notify-dev could take a look to give the final seal of approval

Copy link
Member

@andrewleith andrewleith left a comment

Choose a reason for hiding this comment

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

LGTM - works well locally! A couple of questions about docs to make it clearer to devs how to leverage all the goodies in here, but that doesn't really need to be part of this PR!

@@ -25,6 +25,7 @@ echo -e "complete -F __start_kubectl k" >> ~/.zshrc

# Smoke test
# requires adding files .env_staging and .env_prod to the root of the project
echo -e "alias smoke-local='cd /workspace && cp .env_smoke_local tests_smoke/.env && poetry run make smoke-test-local'" >> ~/.zshrc
Copy link
Member

Choose a reason for hiding this comment

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

There is some nice automation here regarding running the smoke tests in the different environments. Should we add some sort of docs so devs are aware they can do this? Maybe a bit about how/where to store the environment-specific env files?

Maybe its obvious, but it might also be nice to let people know they will need to create a service, some templates, and an API key in order to run them locally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes! good idea - I've added a README.

@sastels sastels merged commit 435c2d8 into main May 6, 2024
4 checks passed
@sastels sastels deleted the local-smoke-test branch May 6, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants