-
Notifications
You must be signed in to change notification settings - Fork 12
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
Run unit tests using multiple configurations #1903
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🧪 Review environmenthttps://cat3e4bsu2nmq4t6owkyxaj3ai0akpia.lambda-url.ca-central-1.on.aws/ |
… second time - updates `pytest.ini` to set `NOTIFY_ENVIRONMENT` = 'production' when running the tests - update the 'production' config to use the same feature flags as prod does right now - update the 'test' config to use the same feature flags as staging does right now
andrewleith
changed the title
Feat/run tests without ffs
Run unit tests using multiple configurations
Jul 24, 2024
andrewleith
commented
Jul 25, 2024
Comment on lines
+39
to
+40
- name: Update NOTIFY_ENVIRONMENT for pytest | ||
run: sed -i 's/NOTIFY_ENVIRONMENT=test/NOTIFY_ENVIRONMENT=production_FF/' pytest.ini |
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.
This is the only difference between the original workflow and the new one. Not sure if we can make these re-usable somehow and not have to copy them.
andrewleith
commented
Jul 25, 2024
whabanks
approved these changes
Jul 25, 2024
jzbahrai
approved these changes
Jul 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary | Résumé
Background
Recently we've had some issues with bugs popping up due to feature flags. While development is ongoing in staging with a particular feature flag on, it is easy to miss ensuring everything will still work in PROD while the feature flag remains off. The idea of this PR is to run our unit tests twice on each PR when feature flag settings differ between staging and prod
Changes
This PR adds support to run 2 instances of our unit tests, in parallel.
By default, our unit tests run using
NOTIFY_ENVIRONMENT=test
which is provided bypytest.ini
. The test workflow has been duplicated and modified to run the unit tests using an alternative value forNOTIFY_ENVIRONMENT
.A new config section for mimicking prod's feature flag configuration has been created, and the existing Test config has been updated to have the same feature flags set as staging does.