diff --git a/ErsatzTV.Tests/Integration/MediaSourceRepositoryDisableSyncTests.cs b/ErsatzTV.Tests/Integration/MediaSourceRepositoryDisableSyncTests.cs index 755b8e4f6..c13aeff52 100644 --- a/ErsatzTV.Tests/Integration/MediaSourceRepositoryDisableSyncTests.cs +++ b/ErsatzTV.Tests/Integration/MediaSourceRepositoryDisableSyncTests.cs @@ -12,7 +12,9 @@ namespace ErsatzTV.Tests.Integration; // ersatztv#460: the disable-sync (remove-and-recreate) flows used to stamp the 0001-01-01 MinValue // sentinel into Library.LastScan. #409 fixed the READ side (the API coerces the sentinel to null and a // migration cleaned historical rows), so the wire contract was already correct — these tests pin the -// WRITE side, so the data is clean at rest for every provider and no new sentinel rows are created. +// WRITE side for every provider, so no NEW sentinel rows are created. They do not (and cannot) speak to +// rows already written before this change: those keep the sentinel at rest and are covered only by the +// read-boundary coercion, since this ships no second cleanup migration. [TestFixture] public class MediaSourceRepositoryDisableSyncTests { diff --git a/docs/testing.md b/docs/testing.md index ccf0a69f4..3b40281b8 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -8,7 +8,7 @@ before adding tests, not just `docs/contributing.md` §8 (which now just points | Project | Covers | Notes | |---|---|---| | `ErsatzTV.Tests` | API controllers + MediatR handlers | In-memory SQLite fixture: a shared `SqliteConnection("Data Source=:memory:;Foreign Keys=False")` kept open + `EnsureCreatedAsync()` (**not** full migration replay) + `PRAGMA foreign_keys=OFF`, then seed; a tiny `IDbContextFactory` wraps `new TvContext(...)`. ~1,870 tests (approximate on purpose — an exact count goes stale on every PR that adds one; the previous hardcoded 828 was off by over a thousand). | -| `ErsatzTV.Core.Tests` | Domain logic, scheduling, IPTV/XMLTV generation | References `ErsatzTV.Application` directly — there is no separate `Application.Tests` project. 543 tests + 1 skipped under `TZ=UTC` (the Block playout golden additionally skips under a non-UTC `TZ`; see Golden-file nets). | +| `ErsatzTV.Core.Tests` | Domain logic, scheduling, IPTV/XMLTV generation | References `ErsatzTV.Application` directly — there is no separate `Application.Tests` project. ~650 tests + 1 skipped under `TZ=UTC` (the Block playout golden additionally skips under a non-UTC `TZ`; see Golden-file nets). | | `ErsatzTV.Scanner.Tests` | Library scanning: scan handlers, folder scanners, NFO readers | Handler tests substitute the folder scanners + `ILibraryRepository` and assert the resulting repository writes (e.g. `ScanLocalLibraryHandlerTests` pins which `LastScan` levels a scan records — ersatztv#264). Fakes/`Testably` back the file-system-facing scanners. ~1,485 tests (approximate on purpose — an exact count goes stale on every PR that adds one). Additionally contains `Core/FFmpeg/TranscodingTests` — `[Explicit]` + `[Combinatorial]`, so it never runs in CI or a plain `dotnet test` (it needs real ffmpeg/hardware) and contributes 0 to that count; run it by name when touching the transcoding pipeline. | | `ErsatzTV.Architecture.Tests` | Layering rules via NetArchTest.eNhancedEdition | Core↛Infra/App/EF; FFmpeg↛all; App↛concrete providers. 5 tests. See `docs/contributing.md` §1. | | `ErsatzTV.FFmpeg.Tests` | FFmpeg command construction | Build a pipeline, assert the exact rendered arg string (`PipelineBuilderBaseTests.cs`). |