test(db): run the startup migration chain against PostgreSQL in CI
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful

Every PostgreSQL test carries Category=RequiresDocker and the pipeline filters
that category out, so the provider production runs on was never exercised and
two upgrade-path bugs reached it in a row. Nothing covered the whole startup
sequence either - code and schema migrations interleaved the way the migration
service orders them.

- run both database stages through JellyfinMigrationService against a seeded
  library and against a fresh install
- take the server from JELLYFIN_TEST_POSTGRES when it is set, else start a
  container
- add a pipeline step that runs the PostgreSQL tests on every push and pull
  request, with the server inside the step: the kubernetes backend has no
  docker daemon, and a service container deadlocks on the workspace volume
This commit is contained in:
2026-09-12 21:28:17 +10:00
parent acab85ada3
commit b501ba9620
6 changed files with 573 additions and 88 deletions
+12
View File
@@ -461,6 +461,18 @@ dotnet test Jellyfin.sln \
--filter "Category!=RequiresDocker&FullyQualifiedName!~Integration"
```
### Run the PostgreSQL migration tests
They run the startup migration chain against a real server. Set `JELLYFIN_TEST_POSTGRES` to a
connection string for an already running server and they use it; without it they start a container
through testcontainers.
```bash
dotnet test tests/Jellyfin.Server.Tests \
--configuration Release \
--filter "Category=RequiresDocker"
```
### Run HA-specific tests
The transcode session store and HA recovery tests live in: