Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3974 Evaluate post-stage test failures to prepare for prod release
  3. SWATCH-4088

test_tally_public_cloud.py::test_validate_tally_on_public_cloud_with_usage[Production]

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • subs-swatch-thunder
    • Swatch Thunder Sprint 2, Swatch Thunder Sprint 3

      https://reportportal-smqe.apps.dno.ocp-hub.prod.psi.redhat.com/ui/#subscription_watch/launches/all/347065/28748432/log?item0Params=filter.eq.hasStats%3Dtrue%26filter.eq.hasChildren%3Dfalse%26filter.in.type%3DSTEP%26filter.in.status%3DFAILED

       

      application = <iqe.base.application.Application object at 0x7fed72153f80>
      usage = 'Production'
      
          @pytest.mark.post_stage_deploy
          @pytest.mark.parametrize(
              "usage", get_random_choices_or_leading_elements(config_parser.get_swatch_usage())
          )
          def test_validate_tally_on_public_cloud_with_usage(application, usage):
              """Create public cloud systems with sla and validate tally data. Get Tally API response
              metadata:
                  assignee: liwalker
                  negative: false
                  requirements: prepay_tally
                  test_steps:
                      1. Read existing tally data with usage.
                      2. Register public cloud system with assigned usage to account.
                      3. Sync Tally data for account.
                      4. Read new tally data.
                      5. Verify tally data shows increased count for public cloud RHEL filtering usage.
                  expected_results:
                      1. Tally data shown is correct.
              """
              initial_usage = application.rhsm_subscriptions.get_today_tally_report_with_metrics_filter(
                  usage=usage, category="cloud", metric_id="Cores"
              )
              cores = get_random_number_from_range_or_minimum(1, 10)
              sockets = get_random_number_from_range_or_minimum(1, 10)
              host = application.rhsm_subscriptions.create_public_cloud(
                  cores=cores,
                  sockets=sockets,
                  is_virtual=True,
                  cloud_provider=get_random_choice_or_first(list(CLOUD_PROVIDER.keys())),
                  usage=usage,
              )
          
              application.rhsm_subscriptions.sync_swatch(wait=True, hostname=host["display_name"])
          
              current_usage = application.rhsm_subscriptions.get_today_tally_report_with_metrics_filter(
                  usage=usage, category="cloud", metric_id="Cores"
              )
              # verify public cloud rhel increased
          
      >       assert current_usage["sockets"] == initial_usage["sockets"] + 1
      E       assert 4 == (4 + 1)
      
      /iqe_venv/lib/python3.12/site-packages/iqe_rhsm_subscriptions/tests/integration/swatch_tally/test_tally_public_cloud.py:336: AssertionError2025-10-07 17:50:18Jump To 

              rhn-engineering-wpoteat William Poteat
              lburnett0 Lindsey Burnett
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: