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

[RHELC-1535] Test set envar through config #1440

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

danmyway
Copy link
Member

@danmyway danmyway commented Nov 26, 2024

  • modify one of the tests to validate the functionality

Jira Issues:

Checklist

  • PR has been tested manually in a VM (either author or reviewer)
  • Jira issue has been made public if possible
  • [RHELC-] or [HMS-] is part of the PR title
  • Label depicting the kind of PR it is
  • PR title explains the change from the user's point of view
  • Code and tests are documented properly
  • The commits are squashed to as few commits as possible (without losing data)
  • When merged: Jira issue has been updated to Release Pending if relevant

@danmyway danmyway requested a review from a team as a code owner November 26, 2024 17:47
@danmyway danmyway requested a review from SerCantus November 26, 2024 17:47
@danmyway danmyway added skip/changelog If it should be excluded from changelog or Release notes. Such as infra, reverted PRs, etc. tests/skip This PR does not require integration tests to be run. kind/tests Improvement or enhancement of the tests labels Nov 26, 2024
@has-bot
Copy link
Member

has-bot commented Nov 26, 2024

This PR does not require integration tests to be run.


Comment generated by an automation.

@danmyway
Copy link
Member Author

/packit test --labels tier1

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.09%. Comparing base (c83d7b6) to head (82584b3).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1440   +/-   ##
=======================================
  Coverage   96.09%   96.09%           
=======================================
  Files          72       72           
  Lines        5143     5143           
  Branches      888      888           
=======================================
  Hits         4942     4942           
  Misses        119      119           
  Partials       82       82           
Flag Coverage Δ
centos-linux-7 91.58% <ø> (ø)
centos-linux-8 92.44% <ø> (ø)
centos-linux-9 92.56% <ø> (ø)

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.

config_path = "/etc/convert2rhel.ini"
config = configparser.ConfigParser()
config.read(config_path)
config.set("host_metering", "configure_host_metering", "force")
Copy link
Member

Choose a reason for hiding this comment

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

Cannot we make this as a generic helper function?, I can see that this can be used in other tests. Maybe make it as a class, that can sets different values?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have that in my backlog 😅
When we move away from the envars completely, and we'll need to set overrides through the config, I'll refactor this to a proper parameterizable helper function.
At the moment given the time constraints I see this as sufficient.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, this can be fixed later on then.

* modify one of the tests to validate the functionality
* disable flaky fail after ponr test

Signed-off-by: Daniel Diblik <[email protected]>
@danmyway
Copy link
Member Author

/packit test --labels tier1

@danmyway danmyway merged commit 02fa48a into oamg:main Nov 28, 2024
29 checks passed
danmyway added a commit to danmyway/convert2rhel that referenced this pull request Nov 29, 2024
* modify one of the tests to validate the functionality
* disable flaky fail after ponr test

Signed-off-by: Daniel Diblik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/tests Improvement or enhancement of the tests skip/changelog If it should be excluded from changelog or Release notes. Such as infra, reverted PRs, etc. tests/skip This PR does not require integration tests to be run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants