Skip to content

Add coverage tests for stress_ng_test (New)#1412

Merged
Hook25 merged 11 commits intomainfrom
add-coverage-stress-ng-test
Aug 22, 2024
Merged

Add coverage tests for stress_ng_test (New)#1412
Hook25 merged 11 commits intomainfrom
add-coverage-stress-ng-test

Conversation

@pedro-avalos
Copy link
Copy Markdown
Collaborator

@pedro-avalos pedro-avalos commented Aug 9, 2024

Description

This adds coverage unit tests for providers/base/bin/stress_ng_test.py. Some minor edits to stress_ng_test.py were required.

Resolved issues

n/a

Documentation

n/a

Tests

This has been tested using python -m coverage run manage.py test -u.

This required changing the parameter for `swap_space_ok` from the arguments namespace to just the swap size.
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.67%. Comparing base (dfae162) to head (7c37d97).
Report is 129 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1412      +/-   ##
==========================================
+ Coverage   45.18%   45.67%   +0.49%     
==========================================
  Files         366      367       +1     
  Lines       39107    39118      +11     
  Branches     6612     6613       +1     
==========================================
+ Hits        17670    17867     +197     
+ Misses      20764    20577     -187     
- Partials      673      674       +1     
Flag Coverage Δ
provider-base 19.91% <100.00%> (+1.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@pedro-avalos pedro-avalos changed the title Add coverage tests for stress_ng_test (Infra) Add coverage tests for stress_ng_test (New, Infra) Aug 12, 2024
@pedro-avalos pedro-avalos changed the title Add coverage tests for stress_ng_test (New, Infra) Add coverage tests for stress_ng_test (New) Aug 12, 2024
@pedro-avalos pedro-avalos requested a review from Hook25 August 12, 2024 14:41
@pedro-avalos pedro-avalos marked this pull request as ready for review August 12, 2024 14:42
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

A few suggestions here and there, I'm not sure why but a couple of tests are failing for me locally. Also, please mock range, it is very taxing to run it (and this is ran all the times)

@Hook25 Hook25 self-assigned this Aug 21, 2024
Remove leading `stress_ng_test` where not needed
Moved `os.geteuid` and `shutil.which` mocks to class level.
@pedro-avalos pedro-avalos requested a review from Hook25 August 21, 2024 17:56
@Hook25 Hook25 merged commit 8f3872d into main Aug 22, 2024
@Hook25 Hook25 deleted the add-coverage-stress-ng-test branch August 22, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants