Skip to content

refactor(tests): split functional tests #1205

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

Merged
merged 2 commits into from
Oct 9, 2020

Conversation

nejch
Copy link
Member

@nejch nejch commented Oct 8, 2020

Glorious copy/paste time! This just splits functional tests in the hope we get more control over weird timing failures.
No attempts yet to add fixture factories which would be very useful here :P But for now, this provides a wait_for_sidekiq helper that should hopefully make it easier to solve if there are still issues.

This will be a pain to review, I wish GitHub/GitLab had code move detection like Review Board :( But the file sizes should be more reasonable now:

$ ls tools/functional/api/*.py | xargs wc -l | sort -h
   12 tools/functional/api/test_deploy_keys.py
   13 tools/functional/api/test_packages.py
   36 tools/functional/api/test_deploy_tokens.py
   42 tools/functional/api/test_current_user.py
   46 tools/functional/api/test_clusters.py
   48 tools/functional/api/test_variables.py
   61 tools/functional/api/test_import_export.py
   74 tools/functional/api/test_snippets.py
   89 tools/functional/api/test_issues.py
   96 tools/functional/api/test_merge_requests.py
  126 tools/functional/api/test_repository.py
  170 tools/functional/api/test_users.py
  183 tools/functional/api/test_gitlab.py
  190 tools/functional/api/test_groups.py
  298 tools/functional/api/test_projects.py

Closes #1113, #1105, #1065, hopefully closes #1033.

Also I realized when doing this that anything to do with group creation/deletion is really slow so maybe it'll help with #1194.

@nejch nejch marked this pull request as ready for review October 8, 2020 00:26
@codecov-io
Copy link

codecov-io commented Oct 8, 2020

Codecov Report

Merging #1205 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1205   +/-   ##
=======================================
  Coverage   77.56%   77.56%           
=======================================
  Files          11       11           
  Lines        2826     2826           
=======================================
  Hits         2192     2192           
  Misses        634      634           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2002098...65ce026. Read the comment docs.

Copy link
Member

@max-wittig max-wittig left a comment

Choose a reason for hiding this comment

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

Really awesome work!

@max-wittig max-wittig self-requested a review October 8, 2020 16:12
Copy link
Member

@max-wittig max-wittig left a comment

Choose a reason for hiding this comment

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

Awesome work. Just a few suggestions!

@nejch nejch force-pushed the refactor/split-functional-tests branch from 524183f to 65ce026 Compare October 8, 2020 20:24
@nejch nejch requested a review from max-wittig October 9, 2020 04:52
@nejch
Copy link
Member Author

nejch commented Oct 9, 2020

Awesome work. Just a few suggestions!

Thanks for the quick review Max! I pushed 65ce026 to address the suggestions :)

@max-wittig max-wittig merged commit 68a4162 into master Oct 9, 2020
@max-wittig
Copy link
Member

Very very nice!

@max-wittig max-wittig deleted the refactor/split-functional-tests branch October 9, 2020 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-enable note tests and revert in 13.1 Functional tests that create/update/delete resources are flaky
3 participants