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-1543] Update integrations tests for overridable config #1223

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

r0x0d
Copy link
Member

@r0x0d r0x0d commented May 15, 2024

Updating the user_path_cli_priority int tests to test for the changes done in #1208.

The test had a small refactor to make it easier to read assert for multiple strings at once. Also removed the interrupt at the beginning to let the tool to process the changes.

Jira Issues:

Checklist

  • PR has been tested manually in a VM (either author or reviewer)
  • Jira issue has been made public if possible
  • [RHELC-] is part of the PR title
  • GitHub label has been added to help with Release notes
  • 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

Updating the user_path_cli_priority int tests to test for the changes
done in oamg#1208.

The test had a small refactor to make it easier to read assert for
multiple strings at once. Also removed the interrupt at the beginning to
let the tool to process the changes.
@r0x0d r0x0d added no-changelog If it should be excluded from changelog or Release notes. Such as infra, reverted PRs, etc. tests-run-tier0 PR ready to run the essential test suit. Equivalent to `/packit test --labels tier0`. labels May 15, 2024
@r0x0d r0x0d requested review from danmyway and kokesak May 15, 2024 13:57
@has-bot
Copy link
Member

has-bot commented May 15, 2024

/packit test --labels tier0


Comment generated by an automation.

Comment on lines +92 to +93
"WARNING - You have passed either the RHSM password or activation key through both the command line and"
" the configuration file. We're going to use the command line values.",

Check warning

Code scanning / CodeQL

Implicit string concatenation in a list Warning

Implicit string concatenation. Maybe missing a comma?
@r0x0d
Copy link
Member Author

r0x0d commented May 15, 2024

/packit test --labels tier0

Comment on lines +86 to +93
c2r_expect_index = c2r.expect(
[
"DEBUG - Found username in /root/.convert2rhel.ini",
"DEBUG - Found password in /root/.convert2rhel.ini",
"DEBUG - Found activation_key in /root/.convert2rhel.ini",
"DEBUG - Found org in /root/.convert2rhel.ini",
"WARNING - You have passed either the RHSM password or activation key through both the command line and"
" the configuration file. We're going to use the command line values.",
Copy link
Member

Choose a reason for hiding this comment

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

Sadly this will not work as intended. It should return the index of the first string that it finds (https://pexpect.readthedocs.io/en/stable/api/pexpect.html?highlight=expect#pexpect.spawn.expect). With this we are not able to verify that the second line is found. So we need to call expect() multiple times to verify multiple strings appearing in the output

Copy link
Member

Choose a reason for hiding this comment

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

I agree with Martin

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh :(

Okay, I will revert the change

@danmyway danmyway changed the title [RHELC-1544] Update integrations tests for overridable config [RHELC-1543] Update integrations tests for overridable config May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog If it should be excluded from changelog or Release notes. Such as infra, reverted PRs, etc. tests-run-tier0 PR ready to run the essential test suit. Equivalent to `/packit test --labels tier0`.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants