source-aware playback statuses.

This commit is contained in:
Dmitry Sergeev
2026-09-01 21:22:30 +03:00
parent d3ea99233d
commit cd0298b136
10 changed files with 151 additions and 41 deletions
+5 -4
View File
@@ -127,10 +127,8 @@ func TestAudioWorkerStatusesInheritGeneration(t *testing.T) {
func(error) bool { return true },
func(status Status) { statuses = append(statuses, status) },
)
_ = worker.Run(
withGeneration(context.Background(), 8),
FeedConfig{Domain: "/audio", UUID: "audio", Active: true},
)
config := FeedConfig{Domain: "/audio", UUID: "audio", Active: true}
_ = worker.Run(withGeneration(context.Background(), 8), config)
if len(statuses) == 0 {
t.Fatal("no statuses emitted")
}
@@ -138,6 +136,9 @@ func TestAudioWorkerStatusesInheritGeneration(t *testing.T) {
if status.Generation != 8 {
t.Fatalf("status generation = %d, want 8: %+v", status.Generation, status)
}
if status.Feed != config {
t.Fatalf("status feed = %#v, want %#v", status.Feed, config)
}
}
}