---
id: TST-PFM-INT-559
title: integration credentials queries
kind: integration
product_area: platform
module: integrations
revision: 1
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
repository: services-platform
files:
  - >-
    modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js
implements: []
environment: local
implementation_state: implemented
latest_result: not-run
latest_run_at: null
latest_run_ref: null
conformance: not-verified
estimated_minutes: 5
isolation: >-
  Use the suite-owned database fixtures and its declared cleanup; prepare the test database before
  integration or lifecycle execution.
evidence:
  - >-
    services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js
test_cases:
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#maps
      every column of the row, an empty one left out
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#is
      not found by another tenant
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#answers
      the active one, and all of them oldest first
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#answers
      no active credential for a connection without one
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#answers
      the active OAuth credentials expiring before the instant, by expiry then id, after the keyset
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#leaves
      out a credential that is not OAuth tokens, or not active
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#answer
      the retired credentials due for destruction, the overdue rotations and the refresh tokens expiring
      soon
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#answer
      nothing that is not yet due
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#is
      claimed once, answering its row with used_at set
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#is
      refused as used the second time
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#is
      refused as expired after its expiry, and as unknown when nobody stored it
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#is
      unknown to another tenant
    provenance: test
  - source: >-
      services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js#is
      answered by the sweep once expired before the instant, and deleted by its hash
    provenance: test
dependency_evidence:
  provenance: test
  source: >-
    services-platform:modules/integrations/tests/integration/services/persistence/integration-credentials.queries.integration.spec.js
  reviewed:
    - Suite introduction
    - Fixture setup
    - Client substitutions
    - Assertions and cleanup
---
# integration credentials queries

## Verification Boundary

This database and service suite exercises integration credentials queries. Its registration records the executable definition; no run result is asserted.

## What This Suite Proves

The suite contains executable checks, but no detailed scenario binding is verified in this pass.

## What It Does Not Prove

In-process execution does not establish deployed infrastructure or a real provider response. Several bindings can supply different parts of a detailed scenario; no single-file completeness is implied.

## Real Dependencies and Test Doubles

The suite definition identifies its database fixtures and replaced clients, hooks, clocks or executors. Integration runs use the prepared database; lifecycle runs exercise the in-process route or adapter path.

## Must Not Be Doubled

The database constraints, transactions and service behavior claimed by an integration binding must execute. Replaced external seams cannot establish live provider or infrastructure behavior.
