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

Add test for BZ 1943306 #13808

Merged
merged 5 commits into from
Jan 17, 2024
Merged
Changes from 4 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
34 changes: 34 additions & 0 deletions tests/foreman/cli/test_reporttemplates.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,40 @@ def test_positive_schedule_entitlements_report(
assert local_subscription['name'] in data_csv


@pytest.mark.tier3
def test_entitlements_report_no_inputs_field(
module_entitlement_manifest_org, local_ak, local_subscription, rhel7_contenthost, target_sat
):
"""Generate an report using the Subscription - Entitlement Report template
without passing in the 'Days from Now' argument in the inputs field, to test the
default setting

:id: 5c4e52b9-314c-470d-9946-3d6e05c85b7e

:steps:
1. hammer report-template generate --organization '' --id '' --report-format ''

:expectedresults: report is generated, and the Days From Now field isn't required

:BZ: 1943306

:customerscenario: true
"""
client = rhel7_contenthost
client.install_katello_ca(target_sat)
client.register_contenthost(module_entitlement_manifest_org.label, local_ak['name'])
sambible marked this conversation as resolved.
Show resolved Hide resolved
assert client.subscribed
result = target_sat.cli.ReportTemplate.generate(
{
'organization': module_entitlement_manifest_org.name,
'name': 'Subscription - Entitlement Report',
'report-format': 'csv',
}
)
# Only care that the Days from Now field isn't required, do not care about content
assert 'Subscription Total Quantity' in result


@pytest.mark.tier3
def test_positive_generate_hostpkgcompare(
module_entitlement_manifest_org, local_ak, local_content_view, local_environment, target_sat
Expand Down