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

[6.15 RFE] Prepare for sca only hammer 6.15 #13627

Merged

Conversation

ColeHiggins2
Copy link
Member

6.15 Features automation: SAT-20202

This test is verifying that hammer notifies users that Simple Content Access will be required for all organizations in the next release

copy of #12963

@ColeHiggins2 ColeHiggins2 added No-CherryPick PR doesnt need CherryPick to previous branches 6.15.z Introduced in or relating directly to Satellite 6.15 labels Jan 5, 2024
@ColeHiggins2 ColeHiggins2 self-assigned this Jan 5, 2024
@ColeHiggins2 ColeHiggins2 requested a review from a team as a code owner January 5, 2024 17:53
@ColeHiggins2
Copy link
Member Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_subscription.py -k test_positive_prepare_for_sca_only_hammer

in str(org_results.stderr)
)
sca_results = target_sat.execute(
f'hammer simple-content-access disable --organization-id {function_org.id}'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we update it to use robottelo cli method SimpleContentAccess.disable()?

Copy link
Member Author

Choose a reason for hiding this comment

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

@Gauravtalreja1 simplecontentaccess.disable() just returns an empty string. I cannot get the required output message unless I pull from robottelo.log

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ColeHiggins2 as you need to verify output from command's stderr, and you're not able to use cli.SimpleContentAccess for this because of ignore_stderr=True argument, you could remove it from here and update the PR for the same https://github.com/SatelliteQE/robottelo/blob/master/robottelo/cli/simple_content_access.py#L33

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@ColeHiggins2 ColeHiggins2 requested a review from a team as a code owner January 10, 2024 16:45
will be required for all organizations in the next release
"""
org_results = target_sat.execute(
f'hammer organization update --id {function_org.id} --simple-content-access false'
Copy link
Collaborator

Choose a reason for hiding this comment

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

can this be updated to use Org CLI?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wasnt able to pull the pull the text "Simple Content Access will be required for all organizations in the next release" from target_sat.cli.Org.update() ... only Organization updated. I think its fine as is

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ColeHiggins2 okay, could we not update this as similar to target_sat.cli.SimpleContentAccess.disable?

Copy link
Member Author

@ColeHiggins2 ColeHiggins2 Jan 12, 2024

Choose a reason for hiding this comment

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

we cannot use target_sat.cli.SimpleContentAccess.disable. that uses the simple-content-access cli command not the organization command. for example:

hammer simple-content-access disable ...
vs
hammer organization update ...

Copy link
Member

Choose a reason for hiding this comment

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

@ColeHiggins2 i think @Gauravtalreja1's suggestion here is to update the target_sat.cli.Org.update method to also be able to give you the raw output. Then you could check stdout and stderr content from there.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@ColeHiggins2 ColeHiggins2 force-pushed the prepare-for-sca-only-hammer-6.15 branch from 605794d to fa5fa57 Compare January 16, 2024 15:54
@ColeHiggins2
Copy link
Member Author

trigger: test-robottelo
pytest: tests/foreman/cli/test_subscription.py -k test_positive_prepare_for_sca_only_hammer

Copy link
Contributor

@vijaysawant vijaysawant left a comment

Choose a reason for hiding this comment

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

lgtm

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.

looks good

@JacobCallahan JacobCallahan merged commit 10bb180 into SatelliteQE:6.15.z Jan 16, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Introduced in or relating directly to Satellite 6.15 No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants