Skip to content

[Testing] No test asserts @@unique([transactionHash,eventType]) dedup, and repository COMPLETED branch is untested #839

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Why this matters

The worker's restart-safety depends on @@unique([transactionHash,eventType]), but no test inserts a duplicate (transactionHash,eventType) against a real DB and asserts the dedup behavior; tests/stream.repository.test.ts only covers CANCELLED/ACTIVE/PAUSED for updateStatus and never exercises the COMPLETED branch.

Acceptance criteria

  • Add an integration test asserting a duplicate (transactionHash,eventType) insert is rejected/deduped
  • Add a unit test for updateStatus('COMPLETED') mapping to isActive=false

Files to touch

  • backend/tests/stream.repository.test.ts
  • backend/tests/integration/stream-lifecycle.test.ts
  • backend/prisma/schema.prisma

Out of scope

  • General coverage-threshold work

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend related tasksdatabasePostgreSQL / PrismatestingTesting related tasks

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions