Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-41265

refactor NoLeadingVirtOperator CNV-8828

XMLWordPrintable

    • 0.42
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • No
    • ---
    • ---
    • 2

      please add test TO CRITICAL ALERT after refactor the timing

      class TestVirtOperatorAlerts: @pytest.mark.parametrize( "annotated_resource, alert_tested", [ pytest.param( { "annotations": { "control-plane.alpha.kubernetes.io/leader": '

      {"holderIdentity":"fake-holder",' '"leaseDurationSeconds":3600,"acquireTime":"now()",' '"renewTime":"now()+1","leaderTransitions":1}

      ' }, "resource_type": Endpoints, "name": VIRT_OPERATOR, }, { "alert_name": "NoLeadingVirtOperator", "labels":

      { "severity": CRITICAL_STR, "operator_health_impact": CRITICAL_STR, "kubernetes_operator_component": KUBEVIRT_STR_LOWER, }

      , "check_alert_cleaned": True, }, marks=(pytest.mark.polarion("CNV-8828")), id="Test_NoLeadingVirtOperator", ) ], indirect=True, ) def test_no_leading_virt_operator( self, prometheus, alert_tested, annotated_resource ): validate_alerts( prometheus=prometheus, alert_dict=alert_tested, timeout=TIMEOUT_15MIN, )

            rh-ee-ahafe Ahmad Hafi
            rh-ee-ahafe Ahmad Hafi
            Debarati Basu-Nag Debarati Basu-Nag
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: