test(db): run the PostgreSQL provider tests in CI #31

Merged
benvin merged 2 commits from benvin/pg-tests-in-ci into main 2026-09-21 07:45:30 +10:00
Member

The fork runs on PostgreSQL in production, but Jellyfin.Database.Tests.PostgreSQL ran in neither CI step: build-test filters out its RequiresDocker trait and postgres-migration-chain never named the project. Three bugs reached production through that gap, and two of the project's own tests had been red the whole time.

  • attach the project to the postgres server the step already starts, via JELLYFIN_TEST_POSTGRES
  • give every test its own database instead of a container per test class
  • alias the session_replication_role scalar as "Value" so EF can bind it
  • insert the owning user before the DisplayPreferences row the FK requires
  • add the project to postgres-migration-chain's build and test commands

Closes #23

The fork runs on PostgreSQL in production, but Jellyfin.Database.Tests.PostgreSQL ran in neither CI step: build-test filters out its RequiresDocker trait and postgres-migration-chain never named the project. Three bugs reached production through that gap, and two of the project's own tests had been red the whole time. - attach the project to the postgres server the step already starts, via JELLYFIN_TEST_POSTGRES - give every test its own database instead of a container per test class - alias the session_replication_role scalar as "Value" so EF can bind it - insert the owning user before the DisplayPreferences row the FK requires - add the project to postgres-migration-chain's build and test commands Closes #23
unkin-agent added 1 commit 2026-09-20 23:48:52 +10:00
test(db): run the PostgreSQL provider tests in CI
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
a025655b4d
Point Jellyfin.Database.Tests.PostgreSQL at the server postgres-migration-chain
already runs, give every test its own database, and fix the two tests that only
ever failed against real PostgreSQL.
Author
Member

tests/Jellyfin.Database.Tests.PostgreSQL/Jellyfin.Database.Tests.PostgreSQL.csproj:23 — ProjectReference on Jellyfin.Server.Tests.csproj drags in the whole Jellyfin.Server dependency graph solely to reuse PostgreSqlTestServer.cs: this project's build output grows 44M → 754M and the full-solution build grows 5.7G → 6.4G (measured), eating the workspace-volume headroom .woodpecker/ci.yaml:25 still documents as 4.1G (now ~3.4G) → replace with a linked <Compile Include="../Jellyfin.Server.Tests/Migrations/PostgreSqlTestServer.cs" Link="PostgreSqlTestServer.cs" /> plus direct Testcontainers.PostgreSql/DotNet.Testcontainers.Builders package refs, and update the ci.yaml headroom comment.

tests/Jellyfin.Database.Tests.PostgreSQL/Jellyfin.Database.Tests.PostgreSQL.csproj:23 — ProjectReference on Jellyfin.Server.Tests.csproj drags in the whole Jellyfin.Server dependency graph solely to reuse PostgreSqlTestServer.cs: this project's build output grows 44M → 754M and the full-solution build grows 5.7G → 6.4G (measured), eating the workspace-volume headroom .woodpecker/ci.yaml:25 still documents as 4.1G (now ~3.4G) → replace with a linked `<Compile Include="../Jellyfin.Server.Tests/Migrations/PostgreSqlTestServer.cs" Link="PostgreSqlTestServer.cs" />` plus direct Testcontainers.PostgreSql/DotNet.Testcontainers.Builders package refs, and update the ci.yaml headroom comment.
unkin-agent added 1 commit 2026-09-21 00:29:12 +10:00
test(db): link PostgreSqlTestServer instead of referencing Jellyfin.Server.Tests
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
d39ec60e2c
Author
Member

No findings.

No findings.
benvin merged commit 1c98f4a074 into main 2026-09-21 07:45:30 +10:00
Sign in to join this conversation.