Skip to content
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

Update portadmin tests to use fixtures #2668

Merged
merged 11 commits into from
Aug 30, 2023

Conversation

stveit
Copy link
Contributor

@stveit stveit commented Aug 30, 2023

Portadmin tests need a revamp. Had issues writing new tests in #2635 because of how these tests are written.

This PR swaps from using unittest and setup/teardown to using fixtures, groups tests together better and fixes some other bad practices (importing all from a module using * for example)

@stveit stveit self-assigned this Aug 30, 2023
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #2668 (552c7b9) into master (83224bf) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #2668   +/-   ##
=======================================
  Coverage   54.61%   54.61%           
=======================================
  Files         560      560           
  Lines       40712    40712           
=======================================
  Hits        22235    22235           
  Misses      18477    18477           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

Test results

     12 files       12 suites   11m 52s ⏱️
3 162 tests 3 162 ✔️ 0 💤 0
8 961 runs  8 961 ✔️ 0 💤 0

Results for commit 552c7b9.

♻️ This comment has been updated with latest results.

@stveit stveit changed the title Update portadmin tests to be a bit more modern Update portadmin tests to use fixtures Aug 30, 2023
@stveit stveit marked this pull request as ready for review August 30, 2023 10:03
@lunkwill42 lunkwill42 self-requested a review August 30, 2023 10:16
Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

Yes yes, beautiful, thank you!

Just: While you're at it, go all the way! :)

tests/unittests/portadmin/portadmin_test.py Outdated Show resolved Hide resolved
tests/unittests/portadmin/portadmin_test.py Outdated Show resolved Hide resolved
tests/unittests/portadmin/portadmin_test.py Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 30, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

❤️

@stveit stveit merged commit 2be7b85 into Uninett:master Aug 30, 2023
11 checks passed
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.

2 participants