Tests: the security case task migration's test imports the migration under its old file name, so it fails on main

Open Beginner friendly
#9,687 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, typescript
Domain
database, testing

Research direction

Open packages/Common/Tests/Server/Infrastructure/Postgres/AddSecurityCaseTaskResponseStepKeyMigration.test.ts and compare its import with the migration file named in the issue. Update the stale import, then run the specified Jest test and the relevant tsc --noEmit command for the Infrastructure test part. Search packages for the old migration filename; done when the test loads and passes, type-checking succeeds, and no stale references remain.

Written by the indexing model from the issue text.

Description

bug follow-up

packages/Common/Tests/Server/Infrastructure/Postgres/AddSecurityCaseTaskResponseStepKeyMigration.test.ts imports a migration file that no longer exists on main (seen 2026-11-19):

import { AddSecurityCaseTaskResponseStepKey1809184720000 } from "../../../../Server/Infrastructure/Postgres/SchemaMigrations/1809184690000-AddSecurityCaseTaskResponseStepKey";

The migration was renumbered: main has packages/Common/Server/Infrastructure/Postgres/SchemaMigrations/1809184720000-AddSecurityCaseTaskResponseStepKey.ts (the class name already says 1809184720000), and no 1809184690000-AddSecurityCaseTaskResponseStepKey.ts.

So the suite can't load the module (jest fails it), and Common's test type-check fails on it (TS2307, cannot find module), in the part that holds Tests/Server/Infrastructure (see packages/Common/Scripts/compile-tests.js).

What to do. Point the import at .../SchemaMigrations/1809184720000-AddSecurityCaseTaskResponseStepKey. Then run npx jest --maxWorkers=2 Tests/Server/Infrastructure/Postgres/AddSecurityCaseTaskResponseStepKeyMigration.test.ts in packages/Common, and the tsc --noEmit -p tsconfig.tests.<part>.json for that part. Check whether any other test or file still names the old file (grep -rn 1809184690000-AddSecurityCaseTaskResponseStepKey packages).

Found while testing #9685, which doesn't touch these files.

Dominant language
TypeScript
Stars
7.7k
Forks
468
Avg merge
1h 9m
Merged PRs (30d)
984

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OneUptime/oneuptime

All issues in OneUptime/oneuptime

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.