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 test which addresses katello-host-tools & entitlement_manifest is… #13161

Merged

Conversation

vijaysawant
Copy link
Contributor

Problem Statement

Hosts-Content > longrun > increamental update feature test was failing in 6.13.z & 6.14.z because content host unabled to install katello-host-tools, also in stream test was failing due to use of module_entitlement_manifest_org fixture

Solution

Implemented changes which will solve said problem, I am not sure wheather to cherry pick these changes into 6.13.z & 6.14.z

@vijaysawant vijaysawant added TestFailure Issues and PRs related to a test failing in automation No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Nov 22, 2023
@vijaysawant vijaysawant requested a review from a team as a code owner November 22, 2023 12:14
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/longrun/test_inc_updates.py -k test_positive_noapply_api

@Griffin-Sullivan
Copy link
Contributor

If the 6.13 and 6.14 failures aren't due to the manifest issues then I would make separate cherry-picks for those and leave this one as is.

tests/foreman/longrun/test_inc_updates.py Show resolved Hide resolved
# Get the applicable errata
errata_list = get_applicable_errata(custom_repo)
assert len(errata_list) > 0

# Apply incremental update using the first applicable errata
entities.ContentViewVersion().incremental_update(
outval = entities.ContentViewVersion().incremental_update(
Copy link
Contributor

Choose a reason for hiding this comment

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

We should update any use of entities to target_sat or module_target_sat

Copy link
Contributor Author

@vijaysawant vijaysawant Nov 24, 2023

Choose a reason for hiding this comment

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

Sure this suggestion can be done.
fyi.. replacement of entities with module_target_sat.api will be taken care by Omkar. So I am not changing non affected part of test module.

Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

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

Looks good, just two small nitpicks and one question

).create()
# Fetch available subscriptions
subs = entities.Subscription(organization=module_entitlement_manifest_org).search()
subs = entities.Subscription(organization=module_sca_manifest_org).search()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
subs = entities.Subscription(organization=module_sca_manifest_org).search()
subs = module_target_sat.api.Subscription(organization=module_sca_manifest_org).search()

Use sat.api instead of entities. But I would say we don't need this kind of check with SCA org.

tests/foreman/longrun/test_inc_updates.py Outdated Show resolved Hide resolved
tests/foreman/longrun/test_inc_updates.py Outdated Show resolved Hide resolved
@vijaysawant vijaysawant force-pushed the fix_incremental_update_longrun branch from 13a03df to e52ce79 Compare November 22, 2023 14:18
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/longrun/test_inc_updates.py -k test_positive_noapply_api

Copy link
Contributor

@damoore044 damoore044 left a comment

Choose a reason for hiding this comment

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

Looking good! Just some nit picks around existing entity calls in some modified fixtures, we should probably switch those over too?

rhel7_sat6tools_repo = entities.Repository(id=rhel7_sat6tools_repo_id).read()
assert rhel7_sat6tools_repo.sync()['result'] == 'success'
return rhel7_sat6tools_repo
sat_client_repo = entities.Repository(id=sat_client_repo_id).read()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sat_client_repo = entities.Repository(id=sat_client_repo_id).read()
sat_client_repo = module_target_sat.api.Repository(id=sat_client_repo_id).read()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, this can be updated

tests/foreman/longrun/test_inc_updates.py Show resolved Hide resolved
tests/foreman/longrun/test_inc_updates.py Show resolved Hide resolved
tests/foreman/longrun/test_inc_updates.py Show resolved Hide resolved
tests/foreman/longrun/test_inc_updates.py Show resolved Hide resolved
tests/foreman/longrun/test_inc_updates.py Outdated Show resolved Hide resolved
tests/foreman/longrun/test_inc_updates.py Outdated Show resolved Hide resolved
"""Enable custom errata repository"""
custom_repo = entities.Repository(
url=settings.repos.yum_9.url,
product=entities.Product(organization=module_entitlement_manifest_org).create(),
product=entities.Product(organization=module_sca_manifest_org).create(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
product=entities.Product(organization=module_sca_manifest_org).create(),
product=module_target_sat.api.Product(
organization=module_sca_manifest_org
).create(),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update

tests/foreman/longrun/test_inc_updates.py Show resolved Hide resolved
tests/foreman/longrun/test_inc_updates.py Show resolved Hide resolved
@vijaysawant
Copy link
Contributor Author

Looking good! Just some nit picks around existing entity calls in some modified fixtures, we should probably switch those over too?

I could change entitiy calls with *_target_sat.api but this change would be applicable in stream version, as I am not going to cherry pick it to older versions (stream only needed *_SCA_manifest_org fixture). Also @omkarkhatavkar will take care of these changes under framework improvement task. So I will not make these changes for now.
Thank you

@vijaysawant vijaysawant force-pushed the fix_incremental_update_longrun branch from e52ce79 to 4abd493 Compare November 23, 2023 08:28
@vijaysawant
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/longrun/test_inc_updates.py -k test_positive_noapply_api

@sambible sambible merged commit b144147 into SatelliteQE:master Nov 27, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master TestFailure Issues and PRs related to a test failing in automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants