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

populate future date subscription in satellite #17550

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vijaysawant
Copy link
Contributor

Problem Statement

Future date subscription doesn't populated on Subscription page
https://issues.redhat.com/browse/SAT-29203

Solution

  1. Add subscription with custom validity period to stage account
  2. in robottelo/conf/manifest.yaml, add a new manifest block
  3. New fixture to create manifest with future date subscription

Related Issues

PRT test Cases example

trigger: test-robottelo
pytest: tests/foreman/ui/test_subscription.py -k 'test_positive_populate_future_date_subcription'

@vijaysawant vijaysawant added No-CherryPick PR doesnt need CherryPick to previous branches Stream Introduced in or relating directly to Satellite Stream/Master labels Feb 7, 2025
@vijaysawant vijaysawant force-pushed the future-date-subscription-populated-on-subscription-page branch from ad84c47 to 3958800 Compare February 12, 2025 08:30
@vijaysawant vijaysawant marked this pull request as ready for review February 12, 2025 08:30
@vijaysawant vijaysawant requested a review from a team as a code owner February 12, 2025 08:30
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.

One proposal..

tests/foreman/ui/test_subscription.py Outdated Show resolved Hide resolved
@vijaysawant vijaysawant requested a review from vsedmik February 17, 2025 07:04
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 to me, just put two nitpicks bellow.

sub_date = sub_datetime.date()

# Compare the dates
assert sub_date > current_date, "Subscription start date is not in the future"
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
assert sub_date > current_date, "Subscription start date is not in the future"
assert sub_date > current_date, 'Subscription start date is not in the future'

session.subscription.delete_manifest(
ignore_error_messages=['Danger alert: Katello::Errors::UpstreamConsumerNotFound']
)
assert not session.subscription.has_manifest, 'Manifest did not delete'
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
assert not session.subscription.has_manifest, 'Manifest did not delete'
assert not session.subscription.has_manifest, 'Manifest was not deleted'

@vijaysawant
Copy link
Contributor Author

Local test execution result:

============================= test session starts ==============================
collecting ... 2025-02-18 22:15:15 - robottelo.collection - INFO - Processing test items to add testimony token markers
collected 9 items / 8 deselected / 1 selected

tests/foreman/ui/test_subscription.py::test_positive_populate_future_date_subcription 

============ 1 passed, 8 deselected, 1 warning in 146.33s (0:02:26) ============
PASSED
Process finished with exit code 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge 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.

3 participants