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 1 commit 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..

assert session.subscription.has_manifest, 'Manifest not uploaded'

# Get current date time and convert into date
current_datetime = datetime.now(ZoneInfo('Asia/Kolkata'))
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 the ZoneInfo shouldn't be hardcoded here, since the test can be run from different timezones.
Something like:

Suggested change
current_datetime = datetime.now(ZoneInfo('Asia/Kolkata'))
from tzlocal import get_localzone_name
current_datetime = datetime.now(ZoneInfo(get_localzone_name()))

There may be better ways than this suggestion.

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.

2 participants