[IO-1334][internal] E2E Testing config #636
Merged
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.
Problem
E2E Tests had no config solution
Solution
Added a
conftest.py
file that incoporated environment variables, with optionaldotenv
for use on local machines. Also added a fixture that is global, and session bound (runs once per test session, not once per test) that allows for these values to be included in tests easily. Have also added custom E2E exceptions that the config code can raise so that if our system raises an error we foresee in config, we can easily spot these in CI.NB: Have deliberately not included the staging URL in the defaults, as it would go into our public code if I did, and possibly shouldn't.
Changelog
e2e_tests/conftest.py
e2e_tests/exceptions.py
e2e_tests/pytest.ini
e2e_tests/test_example.py