Skip to content

End-to-end integration tests #544

@aram356

Description

@aram356

Parent epic

#532

Description

Write Viceroy-based integration tests covering the full identity lifecycle across multiple handlers.

Scope: tests/ (integration test crate or new test module)

Acceptance criteria

  • Full flow: Page load → EC generated → pixel sync writes partner UID → /identify returns UID → auction includes EID.
  • Consent withdrawal: Denied consent clears EC cookie + writes KV tombstone in same request; subsequent /identify returns 403 (consent denied → §11.4); batch sync returns consent_withdrawn within tombstone TTL.
  • KV create failure: EC cookie still set when create_or_revive() fails. /identify returns 200 with degraded: false, empty uids/eids.
  • KV read failure: /identify returns 200 with degraded: true, empty uids/eids.
  • Concurrent writes: Two simultaneous EC creates resolve without data loss (CAS retry).
  • Rate limits: Pixel sync 429 after sync_rate_limit exceeded; batch sync 429 after batch_rate_limit exceeded.
  • Pull sync no-op: Partner returning { "uid": null } → no KV write, no error log.
  • All tests pass under cargo test --workspace with Viceroy.

Spec ref

docs/internal/ssc_technical_spec.md §18.2

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions