Skip to content

Fix unit test failure in LibvirtConvertInstanceCommandWrapperTest#9238

Merged
yadvr merged 1 commit into
4.19from
fix-unit-test-failure
Jun 13, 2024
Merged

Fix unit test failure in LibvirtConvertInstanceCommandWrapperTest#9238
yadvr merged 1 commit into
4.19from
fix-unit-test-failure

Conversation

@vishesh92

@vishesh92 vishesh92 commented Jun 13, 2024

Copy link
Copy Markdown
Member

Description

This PR fixes a unit test failure in LibvirtConvertInstanceCommandWrapperTest.

Before this patch, testGetUnmanagedInstanceDisks calls the getNfsStoragePoolHostAndPath method which then calls mount | grep null. If the system running test has some mounts with the text null in them, the test fails.

This PR fixes this by mocking the return value for getNfsStoragePoolHostAndPath.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@vishesh92 vishesh92 added this to the 4.19.1.0 milestone Jun 13, 2024
@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@codecov

codecov Bot commented Jun 13, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 14.96%. Comparing base (517cddc) to head (dc0d57b).
Report is 2 commits behind head on 4.19.

Additional details and impacted files
@@             Coverage Diff              @@
##              4.19    #9238       +/-   ##
============================================
+ Coverage     4.29%   14.96%   +10.67%     
- Complexity       0    11017    +11017     
============================================
  Files          363     5377     +5014     
  Lines        29356   469586   +440230     
  Branches      5128    58816    +53688     
============================================
+ Hits          1261    70297    +69036     
- Misses       27952   391502   +363550     
- Partials       143     7787     +7644     
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.68% <ø> (?)

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.

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clgtm

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9916

@shwstppr shwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@yadvr yadvr merged commit 74f5e52 into 4.19 Jun 13, 2024
@yadvr yadvr deleted the fix-unit-test-failure branch June 13, 2024 10:36
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants