Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Optionally keep containers after running integration tests#1478

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 7 commits intopython-gitlab:masterfrombenjamb:benbrown/keep-containers
Jun 1, 2021
Merged

Optionally keep containers after running integration tests#1478

nejch merged 7 commits intopython-gitlab:masterfrombenjamb:benbrown/keep-containers
Jun 1, 2021

Conversation

benjamb
Copy link
Contributor

While developing tests, waiting for a new GitLab container to spin up every run became a little frustrating, especially given I only wanted to run one file within the suite.

Added an optional flag which may be passed to pytest to keep the containers around after a test run.

nejch and JohnVillalovos reacted with thumbs up emoji
Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

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

Awesome@benjamb, we lost this when switching from the bash scripts as the cleanup fixture wasnt available in pytest-docker at the time. Was going to get to this but you beat me to it ;)

Just a few tiny comments. BTW, have you tried running the full suites (both API and CLI) a few times in a row to see if our tests actually clean up all resources for consistent results? The functional tests are still in kind of poor shape so I'm not sure. I'll try to play a bit later today but just checking. :) Thanks

Additionally updates token creation to make use of `first_or_create()`,to avoid errors from the script caused by GitLab constraints preventingduplicate tokens with the same value.
@benjamb
Copy link
ContributorAuthor

Just a few tiny comments. BTW, have you tried running the full suites (both API and CLI) a few times in a row to see if our tests actually clean up all resources for consistent results? The functional tests are still in kind of poor shape so I'm not sure. I'll try to play a bit later today but just checking. :) Thanks

I could have sworn I had, though after running the full API tests twice in a row I hit a few errors and have since included some additional fixes to address these on top of this PR.

This is a feature added in 3.8, removing it allows for the test to runwith lower python versions.
Deploy tokens would remain in the instance if the respective project orgroup was deleted without explicitly revoking the deploy tokens first.
Was incorrectly using the issue 'id' vs 'iid'.
Timing issues between requesting group deletion and GitLab enacting thatdeletion resulted in errors while attempting to delete a user which wasthe sole owner of said group (see: test_groups). Pass the 'hard_delete'parameter to ensure user deletion.
@nejchnejch merged commitd981956 intopython-gitlab:masterJun 1, 2021
@benjambbenjamb deleted the benbrown/keep-containers branchJune 2, 2021 07:46
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchnejch approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@benjamb@nejch

[8]ページ先頭

©2009-2025 Movatter.jp