Skip to content

more fine-grained reporting tests #18951

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pondrejk
Copy link
Contributor

@pondrejk pondrejk commented Jul 8, 2025

Problem Statement

related to SAT-30441

Solution

Related Issues

@pondrejk pondrejk self-assigned this Jul 8, 2025
@pondrejk pondrejk requested review from a team as code owners July 8, 2025 13:44
@pondrejk pondrejk added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Jul 8, 2025
@pondrejk
Copy link
Contributor Author

pondrejk commented Jul 8, 2025

trigger: test-robottelo
pytest: tests/foreman/api/test_host.py -k test_positive_create_and_update_with_subnet

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 12014
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_host.py -k test_positive_create_and_update_with_subnet --external-logging
Test Result : =========== 1 passed, 63 deselected, 7 warnings in 957.69s (0:15:57) ===========

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 8, 2025
"""
Runs satellite-maintain report generate and extracts the value for a given key
"""
result = self.execute(f'satellite-maintain report generate | grep -i "{report_key}"')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add this command to robottelo CLI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added that and used this form in the usage_report module_generate_report fixture, but for this case I'd like to filter only a selected part of it, grepping on the machine seems to me as a more effective way

@pondrejk pondrejk requested a review from a team as a code owner July 9, 2025 09:20
@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Jul 9, 2025
from robottelo.cli.base import Base


class Report(Base):
Copy link
Contributor

Choose a reason for hiding this comment

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

Won't people mistake this with report template report generation? Because I did when I saw module_target_sat.cli.Report.generate({'output': filename}) :)


@classmethod
def generate(cls, options=None, env_var=None):
"""Build satellite-maintain service start"""
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is some copy-paste leftover

Runs satellite-maintain report generate and extracts the value for a given key
"""
result = self.execute(f'satellite-maintain report generate | grep -i "{report_key}"')
assert result.status == 0, 'key not found in the report'
Copy link
Contributor

Choose a reason for hiding this comment

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

Or the report itself may have failed, the message may be misleading

Copy link
Contributor

@lhellebr lhellebr left a comment

Choose a reason for hiding this comment

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

Overally LGTM, pending comments

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants