Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-3144

Component Test swatch-producer-azure multiple marketplace credentials

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • swatch-producer-azure

      Scenarios to test:

      • Billable usage gets sent to a marketplace using one set of credentials that fails with a 403. Then tries with the next set of credentials and gets a successful response

      Requires update to vault secret (EE config only has one set of mock credentials currently, we need 2+):

      https://vault.devshift.net/ui/vault/secrets/insights/kv/secrets%2Finsights-dev%2Frhsm-ci%2Fazure-marketplace-credentials/details?version=2

      The "wrong" mock credential should appear first in the config, so that it will be attempted first (the azure producer tries each credential in order of definition).

      These credentials are used to retrieve access tokens, wiremock definitions will need to be updated to respond with different access tokens for each credential.

      Additionally, Azure metering Wiremock definitions will need to be updated to respond with 403 when the new access token for the "wrong" mock credential is attempted.

      References:

      https://learn.microsoft.com/en-us/partner-center/marketplace-offers/marketplace-metering-service-authentication

      SWatch-3043 Component Test General Info Doc

       

      Done

      • A component test is written in IQE where the first credential fails, and then the second credential succeeds (on the retry)
      • Include the explanation of why this test is necessary in the comment/description of the test.  Since swatch doesn't have a way of knowing whether to use a US or Europe marketplace credentials, the application tries one then the other.  This isn't meant to be a "bad credentials" test.

              rhn-sqe-tmcknigh Trayvon McKnight
              kflahert@redhat.com Kevin Flaherty
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: