Update TransactionIntegrationTests to use unique channel identifiers for deletion tests
ci / build-backend (push) Successful in 1m27s
ci / build-frontend (push) Successful in 54s
ci / tests (push) Successful in 1m39s
ci / sonar (push) Successful in 4m36s

Modified the channel creation in the DeleteShow tests to generate unique identifiers using GUIDs, ensuring test isolation and preventing potential conflicts. This change enhances the reliability of the integration tests related to show deletion functionality.
This commit is contained in:
Leonid Pershin
2026-07-28 12:26:12 +03:00
parent 4a500583e7
commit 30a38d163c
@@ -121,7 +121,7 @@ public sealed class TransactionIntegrationTests(PostgresFixture fixture)
[SkippableFact] [SkippableFact]
public async Task DeleteShow_WithSchedule_CutsFutureEntries() public async Task DeleteShow_WithSchedule_CutsFutureEntries()
{ {
var channel = Channel.Create("Канал", "kanal", DateTimeOffset.UnixEpoch); var channel = Channel.Create("Канал", $"cut-{Guid.NewGuid():N}", DateTimeOffset.UnixEpoch);
var show = Show.Create("Шоу", ShowKind.Single); var show = Show.Create("Шоу", ShowKind.Single);
var asset = MediaAsset.Register("live.mkv", ".mkv", MediaSource.Upload); var asset = MediaAsset.Register("live.mkv", ".mkv", MediaSource.Upload);
show.AddEpisode(asset.Id); show.AddEpisode(asset.Id);
@@ -181,7 +181,7 @@ public sealed class TransactionIntegrationTests(PostgresFixture fixture)
[SkippableFact] [SkippableFact]
public async Task DeleteShow_WithMedia_RemovesEverything() public async Task DeleteShow_WithMedia_RemovesEverything()
{ {
var channel = Channel.Create("Канал", "kanal", DateTimeOffset.UnixEpoch); var channel = Channel.Create("Канал", $"del-{Guid.NewGuid():N}", DateTimeOffset.UnixEpoch);
var show = Show.Create("Шоу", ShowKind.Single); var show = Show.Create("Шоу", ShowKind.Single);
var asset = MediaAsset.Register("movie.mkv", ".mkv", MediaSource.Upload); var asset = MediaAsset.Register("movie.mkv", ".mkv", MediaSource.Upload);
show.AddEpisode(asset.Id); show.AddEpisode(asset.Id);