diff --git a/persistence/artwork_queue_repository_test.go b/persistence/artwork_queue_repository_test.go index cbea6a078..d11d89a1f 100644 --- a/persistence/artwork_queue_repository_test.go +++ b/persistence/artwork_queue_repository_test.go @@ -415,35 +415,8 @@ var _ = Describe("ArtworkQueueRepository", func() { To(Equal(model.ArtworkAbsentStat{Total: 2, Stale: 1})) }) - // status prints both under one "absent" heading, so a writer that stops clearing hash and - // source together would make the two numbers disagree with no other warning. - It("agrees with the source-based absent count", func() { - awRepo := NewArtworkRepository(context.Background(), GetDBXBuilder()) - for _, ia := range []model.ItemArtwork{ - {ItemKind: "ar", ItemID: "absent1", ImageType: model.ImageTypePrimary, Hash: "", Source: "", AttemptedAt: time.Now()}, - {ItemKind: "ar", ItemID: "absent2", ImageType: model.ImageTypePrimary, Hash: "", Source: "", AttemptedAt: time.Now()}, - {ItemKind: "ar", ItemID: "found1", ImageType: model.ImageTypePrimary, Hash: "hX", Source: "folder", AttemptedAt: time.Now()}, - } { - Expect(awRepo.PutItemArtwork(&ia)).To(Succeed()) - } - - stat, err := repo.CountAbsent(model.KindArtistArtwork, time.Now()) - Expect(err).ToNot(HaveOccurred()) - Expect(repo.CountBySource(model.KindArtistArtwork, []string{""})).To(Equal(stat.Total)) - }) - It("reports a kind with no absent state as zero, not as an error", func() { Expect(repo.CountAbsent(model.KindRadioArtwork, time.Now())).To(Equal(model.ArtworkAbsentStat{})) }) - - It("counts without enqueueing", func() { - awRepo := NewArtworkRepository(context.Background(), GetDBXBuilder()) - Expect(awRepo.PutItemArtwork(&model.ItemArtwork{ItemKind: "ar", ItemID: "ar9", - ImageType: model.ImageTypePrimary, Hash: "", AttemptedAt: time.Now()})).To(Succeed()) - - _, err := repo.CountAbsent(model.KindArtistArtwork, time.Now()) - Expect(err).ToNot(HaveOccurred()) - Expect(repo.Count()).To(BeZero()) - }) }) })