Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-15713

Fix defaults for mocked objects in observabilityclient unit tests

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • None
    • CloudOps 2025 Sprint 7
    • 1

      Goal: 

      There is at least one occasion here https://opendev.org/openstack/python-observabilityclient/src/branch/master/observabilityclient/tests/unit/test_python_api.py#L34 , where the rbac object is mocked and all the properties are manually set except of the disable_rbac. That means, that disable_rbac is defaulted to True, which is different than what it would be by default when creating the object without mocking it (it'd be false by default). This causes some of the tests to behave incorrectly.

      Acceptance Criteria:

      • All the uses of creating mocked objects is reviewed for setting default values.
      • All found issues are fixed

              rh-ee-jwysogla Jaromir Wysoglad
              rh-ee-jwysogla Jaromir Wysoglad
              rhos-conplat-observability
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: