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

Cover nil paramaters in Redis Security Updates

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • None
    • RHOAM Sprint 37

      WHAT
      Add a unit test to cover cases where params may not be in the return object from AWS for elasticache UpdateActions.

      HOW

      Add an additional test case to this test -> https://github.com/integr8ly/cloud-resource-operator/blob/master/pkg/providers/aws/provider_redis_test.go#L2246-L2250 where by the new case has those values empty or not available in the object.

      See the additional unit test case added for similar nil possibilities in Postgres here -> https://github.com/integr8ly/cloud-resource-operator/pull/414/files?diff=unified&w=0

       

      If the test case indicates that the logic would fail in the case of any of those parameters being missing then handle that in the code. Using SafeStringDereference might be an option as it's already used in the existing function. 

      DONE
      Test case is added and the logic in the function passes the case.

              rh-ee-fwaters Fiona Waters
              lfitzger@redhat.com Laura Fitzgerald
              Kevin Chi Keen Fan Kevin Chi Keen Fan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: