-
Notifications
You must be signed in to change notification settings - Fork 81
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
base: main
Are you sure you want to change the base?
Conversation
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.
"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
/packit test --labels tier0 |
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.", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Martin
There was a problem hiding this comment.
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
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
[RHELC-]
is part of the PR titleRelease Pending
if relevant