---
id: TST-PFM-SEC-133
title: Portal pool removal database and service checks
kind: integration
product_area: platform
module: security
revision: 2
status: draft
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
repository: services-platform
files:
  - modules/security/tests/integration/services/onboarding/portal-pool-removal.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: 3
isolation: Use the prepared test database and suite-owned fixture rows; retain shared seed records.
assertion_evidence:
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#removing
      a tenant’s registered portal pool
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#counts
      the standing pool in the inventory before the purge
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#answers
      done, having removed one pool
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#describes
      the pool, deletes its domain, turns its protection off, deletes it, then deletes its stack
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#records
      the pool deleted in the resource registry
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#counts
      nothing standing afterwards, though the registry row is still there for platform.security to
      remove
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#asks
      AWS nothing on a retry and answers done with nothing removed
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#removing
      a portal pool Cognito no longer has
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#answers
      done, so a purge interrupted after Cognito deleted the pool converges
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#still
      deletes the stack, and asks nothing else of a pool that is not there
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#removing
      a reservation whose stack built a pool it never registered
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#finds
      the pool from the stack’s resources and deletes it, then the stack
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#removing
      a registered pool tagged for another tenant
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#blocks
      the purge, naming the pool and the tag it carries
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#reads
      the pool and deletes nothing of it
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#purging
      a tenant whose portal pool is recorded but not registered
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#blocks
      the purge for an operator, naming what is recorded
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#counts
      the recorded pool as standing
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#purging
      a tenant that never had a portal pool
  - provenance: test
    source: >-
      services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js#answers
      not applicable and asks AWS nothing
dependency_evidence: >-
  The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here.
  The suite controls Cognito at the declared seams; those collaborators remain outside its live
  proof.
evidence:
  - >-
    services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js
  - >-
    Static review at the recorded source revision; executable results remain not-run and conformance
    remains not-verified.
binding_note: >-
  The file has no scenario binding established by this examination. Its executable checks remain
  registered without assigning them broader acceptance coverage.
examiner: codex
examined_at: '2026-10-23'
final_text: OpenAI
dependency_review:
  provenance: test
  source: >-
    services-platform:modules/security/tests/integration/services/onboarding/portal-pool-removal.integration.spec.js
  explicit_no_doubles: false
  identified_double_boundaries:
    - Cognito
---
# Portal pool removal database and service checks

## Verification Boundary

The file exercises database or service behavior through the local integration harness. The assertion references identify the source checks for portal pool removal.

## What This Suite Proves

The file supplies executable engineering checks for the named subject. No complete acceptance scenario is inferred from the file’s existence.

## What It Does Not Prove

This examination does not run the suite. Passing behavior, deployed conformance and the behavior of substituted dependencies require separate execution evidence.

## Real Dependencies and Test Doubles

The prepared PostgreSQL database supplies the persisted fixtures and constraints exercised here. The suite controls Cognito at the declared seams; those collaborators remain outside its live proof.

## Must Not Be Doubled

Keep the queried database, applicable constraints and transaction boundaries real. Provider substitutes cannot establish delivery, cloud execution or cross-service recovery.
