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

Fix the failture of ubipop for rhel7 #240

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/integration/test_association.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,18 @@ def test_run_ubi_pop_for_rhel7(pulp_client):
), "Can't find the modulemd_default :{}".format(modulemd_defaults)

# verify the modulemd exist and modulemd default in the cdn server
modulemds = query_repo_modules(None, "ubi", rpm_repo_url, full_data=True)
modulemds = query_repo_modules(None, "ubi", rpm_repo_url)
Copy link
Member

Choose a reason for hiding this comment

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

you do another unnecessary call for the second time a few lines later, can you please refactor this so it does only one call and then filters received data in query_repo_modules ?

while "" in modulemds:
Copy link
Member

Choose a reason for hiding this comment

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

can you move this to query_repo_modules function? This filtering shouldn't be part of test. You can likely need this operation for other tests in future, so it's better to be done once in the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the same as below comments, i will close the merge request.
and submit a patch for changing the slave

modulemds.remove("")
assert len(modulemds) == 3, "Unexpected repo modulemds found."
# assert the module prefile
modulemds = query_repo_modules(None, "ubi", rpm_repo_url, full_data=True)
mod_name, mod_profile = separate_modules(modulemds)[0]
assert mod_name == "httpd", "Expected modulemd: httpd, found modulemd: {}".format(
mod_name
)
assert (
"common [d]" in mod_profile
"common" in mod_profile
Copy link
Member

Choose a reason for hiding this comment

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

Did really the output changed for default modules? Or do we have rather problem in testing data or ubi-population-tool?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hi Robert, the cause is the same as previous one query_repo_modules. After some investigation, the method works well in fedora38, in fedora 40, it will return in wrong format
Name Stream Profiles Summary
httpd 2.4 [d] common [ Apache HTTP Server
d], defa
ult, dev
el
if i update the yum update util-linux in fedora 40, the method can return mormally.
In summary, nothing wrong in this method, but something problem in os.
so i will change the fedora 40 slave script instead of changing the method

), "Modulemd httpd should have common profile as default."


Expand Down