Uploaded image for project: 'Managed Service - API'
  1. Managed Service - API
  2. MGDAPI-3664

Fix flaky CRO unit test

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • 2
    • False
    • Hide

      None

      Show
      None
    • False
    • Yes
    • Sprint 23

      WHAT
      One of the CRO tests is expecting a VPC with a particular CIDR range but sometimes a different CIDR range is used. This error has been seen locally. As the prow coverage jobs run the unit tests, the unit tests are run twice, and so one of the prow jobs is failing relatively consistently for new PR's, requiring re-testing.

      === RUN TestNetworkProvider_ReconcileNetworkProviderConfig/verify_default_cidr_block_and_no_error_on_empty_cidr_blocktime="2022-03-23T11:41:21Z" level=info msg="fetching _network strategy config for tier test"time="2022-03-23T11:41:21Z" level=info msg="found cluster test vpc testID"    cluster_network_provider_test.go:1563: ReconcileNetworkProviderConfig() got = 172.16.0.0/26, want 10.6.0.0/26
      
      --- FAIL: TestNetworkProvider_ReconcileNetworkProviderConfig (0.00s)    --- PASS: TestNetworkProvider_ReconcileNetworkProviderConfig/verify_successful_reconcile (0.00s)    --- PASS: TestNetworkProvider_ReconcileNetworkProviderConfig/verify_invalid_CIDR (0.00s)    --- PASS: TestNetworkProvider_ReconcileNetworkProviderConfig/verify_unmarshal_error (0.00s)    --- FAIL: TestNetworkProvider_ReconcileNetworkProviderConfig/verify_default_cidr_block_and_no_error_on_empty_cidr_block (0.00s)    --- PASS: TestNetworkProvider_ReconcileNetworkProviderConfig/verify_empty_cidr_blocks_returns_a_error (0.00s)    --- PASS: TestNetworkProvider_ReconcileNetworkProviderConfig/verify_no_non_overlapping_available_cidr_blocks_returns_a_error (0.00s)

      HOW
      There are 2 different CIDR ranges that are iterated over, defined in this function. It would be worth checking whether the error is due to another test, or whether there is some randomness involved in the iteration over the keys in the map.

      TESTS
      <List of related tests>

      DONE
      <bullet point items for what should be completed>

              dmoskale@redhat.com Denis Moskalenko
              acatterm@redhat.com Adam Cattermole
              Patryk Stefanski Patryk Stefanski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: