Skip to content

Update test scenarios for the new paginated GET /subscriptions response #82

Description

@hdamker

Problem description

code/Test_definitions/device-reachability-status-subscriptions-retrieveDeviceReachabilityStatusSubscriptionList.feature still tests the old, pre-0.9.0 contract for GET /subscriptions:

  • The happy-path scenarios assert the response body complies with an array of OAS schema defined at "#/components/schemas/Subscription". Since #63, the response is a wrapper object (SubscriptionList: { subscriptions: [...], pagination: {...} }), not a bare array.
  • No scenario exercises the new page / perPage query parameters.
  • No error scenarios cover invalid page / perPage values, even though both parameters are documented as rejecting invalid values with a 400 error.

Expected action

Update the feature file so it matches the current OpenAPI definition:

  • Change response-body assertions to check the SubscriptionList object (subscriptions array + pagination object), and add assertions for the X-Total-Count / X-Total-Pages / Link response headers.
  • Add scenarios covering page and perPage, including at least one pagination-across-multiple-pages case.
  • Add 400 error scenarios for invalid page / perPage values, matching the documented error behaviour on those parameters.

Additional context

Found during release review of r2.1 (PR #76). This is a test-only gap — the OpenAPI contract itself is sound. Not a blocker for r2.1; fix in a follow-up PR. Same gap, same root-cause PR pattern, also found in camaraproject/DeviceRoamingStatus#93.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions