-
Notifications
You must be signed in to change notification settings - Fork 115
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
[Pheonix Subs] Fix AK creation in ui/test_activationkey.py #17290
base: master
Are you sure you want to change the base?
[Pheonix Subs] Fix AK creation in ui/test_activationkey.py #17290
Conversation
trigger: test-robottelo |
PRT Result
|
trigger: test-robottelo |
PRT Result
|
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.
One proposal, otherwise looks good to me.
@@ -760,6 +791,7 @@ def test_positive_add_docker_repo_cv(session, module_org, module_target_sat): | |||
content_view = module_target_sat.api.ContentView( | |||
composite=False, organization=module_org, repository=[repo] | |||
).create() | |||
sleep(5) |
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.
It looks the test fails with "errors":["Pending tasks detected in repositories of this content view.
because there is the Metadata generate task running in the background after repo creation.
Could you use wait_for_task
instead of sleep(5)
? Though the sleep works now it may not be enough in future, IMHO we should better wait for the dependant background task before proceeding with publish.
You can do this
sleep(5) | |
module_target_sat.wait_for_tasks( | |
search_query='Actions::Katello::Repository::MetadataGenerate' | |
f' and resource_id = {repo.id}' | |
' and resource_type = Katello::Repository', | |
max_tries=6, | |
search_rate=10, | |
) |
or better, throw it into a fixture together with the repo creation like here, so you don't duplicate code for the other sleep.
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 pending existing 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.
Ack
Plus one to use of 'wait for metadata generation tasks'.
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, pending comments from @vsedmik
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, pending vsedmik`s comment
Problem Statement
Since 6.17 Activation keys create and update ops need both - CV and LCE, or none of them.
This new reality broke a couple of tests.
Solution
This PR fixes UI tests in activationkey.py
Related Issues
SAT-28577