Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-26905

MBOP crashes when there are no more users to retrieve when using "mock" as the "USER_MODULE"

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Unset
    • No

      Description

      When calling the "GET v3 users" endpoint, if the offset is set to something higher than the total count that MBOP can fetch, the server crashes.

      Steps to reproduce

      1. Launch MBOP as follows:

      USERS_MODULE=mock ./mbop
      

      2. Send a request to the "GET v3 users endpoint" with "1000" as the offset —since there are just 1000 mocked users—:

      curl \
          --dump-header - \
          --show-error \
          --silent \
          --location 'http://localhost:8090/v3/accounts/12345/users?admin_only=false&sortOrder=asc&limit=1&offset=1000'
      

      1. Expected behavior

      It should return the empty JSON array "[].

      1. Obtained behavior

      The server crashes and drops the connection.

              Unassigned Unassigned
              mbarcina@redhat.com Mikel Barcina
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: