-
Notifications
You must be signed in to change notification settings - Fork 0
MPT-14713 E2E TDR Proof of concept #97
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
Conversation
b9fe6c4 to
055ee99
Compare
9bf8b78 to
54c7b5e
Compare
- Moved unit tests from `tests/` to `tests/unit/` - Added dummy e2e test in `tests/e2e/` - Updated pytest setup to not run tests mark as e2e - Added docker image to run e2e tests with `docker compose run --rm e2e` - Added `pytest-rerunfailures` dev dependency to rerun failed api calls (flaky tests) - Update Error handler to handle JSON responses for generic HTTP Errors (404, 401, ...)
54c7b5e to
8e5fbd9
Compare
|
| run: docker compose run --service-ports app_test | ||
|
|
||
| - name: "Run E2E test" | ||
| run: docker compose run --service-ports -e MPT_API_BASE_URL=$MPT_API_BASE_URL -e MPT_API_TOKEN=$MPT_API_TOKEN e2e |
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.
Keep in mind that the values of these parameters depend on the branch for main --> test env/ for release/* - staging env
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.
env:
MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
MPT_API_TOKEN: ${{ secrets.MPT_API_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.
we may have to review this part. But so far we can control those variables from the pipeline setup.
|
|
||
|
|
||
| @pytest.mark.flaky(reruns=5, reruns_delay=0.01) # noqa: WPS432 | ||
| @pytest.mark.e2e |
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 you remind me what marks should be here? Looks a little bit extra to have e2e folder and e2e mark at the same time
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.
I completely agree, we have not taken a final call in which way to go.
Current setup if you run pytest with no parameters, the e2e will not run.
We can cleanup these marks in the future after we do the final call on the TDR.



tests/totests/unit/tests/e2e/docker compose run --rm e2epytest-rerunfailuresdev dependency to rerun failed api calls (flaky tests)