# Okta Integration Baseline

`composer test:okta-integration` resets the disposable `una_test` database from a SQL baseline before each scenario.

Baseline lookup order:

1. `OKTA_BASELINE_SQL`, if set.
2. `tests/Fixtures/OktaConnect/baselines/current.local.sql`, if present.
3. `tests/Fixtures/OktaConnect/baselines/current.sql`, if present.

## Local Generation

Generate the ignored local baseline inside Docker:

```bash
docker compose exec -T -w /var/www php -r 'require "vendor/autoload.php"; Tests\Support\OktaConnect\OktaIntegrationBaselineArtifactBuilder::build("docker/dumps/dev.setup.21-02-2026.sql");'
```

Then run:

```bash
docker compose exec -T -w /var/www php composer test:okta-integration
```

## Do Not Use Raw Dev Dump Directly

Do not set `OKTA_BASELINE_SQL` to `docker/dumps/dev.setup.21-02-2026.sql`.

The resetter imports `OKTA_BASELINE_SQL` as-is. It does not sanitize or normalize the dump at test time. The raw dump contains dev data and does not represent the filtered current-schema Okta test baseline.

## PII Rule

`current.local.sql` is ignored because it is generated from the dev dump. The builder filters mutable user/content data and rewrites retained email-shaped strings, but automation alone is not treated as PII approval.

Only commit `current.sql` after human PII review approves the generated baseline.
