-
Notifications
You must be signed in to change notification settings - Fork 116
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
[Test Fix] Updating Tools repo to Utils repo in the recommended repos test #13223
[Test Fix] Updating Tools repo to Utils repo in the recommended repos test #13223
Conversation
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.
- Can you please update repo names from
:expectedresults: 2
?Capsule/Tools
would beCapsule/Utils
- Suggested new variable name,
cap_tool_repos
would becap_utils_repos
- query about assertion statement
One more thing I realised, test would failed in 6.15 due to use of fixture module_entitlement_manifest_org
, please use alternative module_sca_manifest_org
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.
Could you please take a look into suggested points? I have given collective feedback.
I can see requested changes have been completed, Ack on basis of that changes.
Please run PRT comment.
Please run PRT for affected tests |
trigger: test-robottelo |
tests/foreman/ui/test_repository.py
Outdated
@@ -942,10 +942,10 @@ def test_positive_recommended_repos(session, module_entitlement_manifest_org): | |||
cap_tool_repos = [ | |||
repo['name'] | |||
for repo in rrepos_on | |||
if 'Tools' in repo['name'] or 'Capsule' in repo['name'] | |||
if 'Utils' in repo['name'] or 'Capsule' in repo['name'] | |||
] | |||
cap_tools_repos = [repo for repo in cap_tool_repos if repo.split()[4] != sat_version] |
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 think instead of checking this for != sat_version, we should verify if n-1 repos are being suggested for capsule and utils repos
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.
these repos should always match the sat version. so if any do not, then we throw the error message
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 tested locally, as in updated code for variable cap_utils_main_repos
, getting sat_version n-1
value, as you suggested @Gauravtalreja1
We can assert currect sat version
and the sat version
which found in repo names (in cap_utils_main_repos
list) does not same, as per the step number 3
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.
The current code is checking that ANY Repository not equal to the current sat version is not there. I don't see a reason to make it ONLY n-1.
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.
yes, I think with n-1 it will be more explicite and efficient assertion here, which would all repositories equal to n-1 versions instead of checking not equal to current sat versions
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.
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.
@Gauravtalreja1 my observation
On one of older snap version of 6.15 snap 3.0
I had seen 6.14 repos of capsule/maintain/Utils
but on latest snap verson of 6.15 snap 9.0
I couldn't see.
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 believe that on Satellite of version N only the N capsule/maintain/utils
repos should be recommended. In other words, N-1, N-2, and all older repos should be missing.
@Gauravtalreja1, can you describe why you propose to check N-1 only?
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.
@Gauravtalreja1 my observation On one of older snap version of
6.15 snap 3.0
I had seen 6.14 repos ofcapsule/maintain/Utils
but on latest snap verson of6.15 snap 9.0
I couldn't see.
This is expected behavior. at some point between snap 3 and 9, 6.14 repos were removed from recommended.
Pending other requester comments |
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.
co-reviewed with @rplevka.
ACK, pending @Gauravtalreja1 and @vijaysawant comments.
364d41c
to
49f17a8
Compare
trigger: test-robottelo |
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.
- As per suggestion from @Gauravtalreja1 and @ogajduse I have tested this PR by making changes locally, working fine.
- @ColeHiggins2 you need to incorporate the suggested changes
- run pre-commit
- force push
tests/foreman/ui/test_repository.py
Outdated
@@ -942,10 +942,10 @@ def test_positive_recommended_repos(session, module_entitlement_manifest_org): | |||
cap_tool_repos = [ | |||
repo['name'] | |||
for repo in rrepos_on | |||
if 'Tools' in repo['name'] or 'Capsule' in repo['name'] | |||
if 'Utils' in repo['name'] or 'Capsule' in repo['name'] | |||
] | |||
cap_tools_repos = [repo for repo in cap_tool_repos if repo.split()[4] != sat_version] |
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 tested locally, as in updated code for variable cap_utils_main_repos
, getting sat_version n-1
value, as you suggested @Gauravtalreja1
We can assert currect sat version
and the sat version
which found in repo names (in cap_utils_main_repos
list) does not same, as per the step number 3
trigger: test-robottelo |
PRT Result
|
PRT Result
|
trigger: test-robottelo |
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.
logic looks good, will merge when we can see a passing PRT run.
PRT Result
|
|
PRT Result
|
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.
Ack, with one pending comment from earlier, let me know what you think
|
PRT Result
|
PRT failed to enable recommended repos in 6.14. Do we need to CP something in Airgun?
|
trigger: test-robottelo |
All comments are addressed, Code is reviewed. Moving to draft until 6.15 airgun fix is merged |
PRT Result
|
|
PRT Result
|
This pull request has not been updated in the past 45 days. |
@ColeHiggins2 should we close this? |
This pull request has not been updated in the past 45 days. |
This pull request is now being closed after stale warnings. |
The Tools repository was removed and is not longer in the recommended repo list. Switching the repository check to use the Utils and Capsule repositories instead