diff --git a/engine/import_test.go b/engine/import_test.go index 1981e63..b128232 100644 --- a/engine/import_test.go +++ b/engine/import_test.go @@ -110,9 +110,10 @@ func TestImportLastFM(t *testing.T) { require.NoError(t, err) track, err := store.GetTrack(context.Background(), db.GetTrackOpts{Title: "because I'm stupid?", ArtistIDs: []int32{artist.ID}}) require.NoError(t, err) - listens, err := store.GetListensPaginated(context.Background(), db.GetItemsOpts{TrackID: int(track.ID)}) + t.Log(track) + listens, err := store.GetListensPaginated(context.Background(), db.GetItemsOpts{TrackID: int(track.ID), Period: db.PeriodAllTime}) require.NoError(t, err) - assert.Len(t, listens.Items, 1) + require.Len(t, listens.Items, 1) assert.WithinDuration(t, time.Unix(1749776100, 0), listens.Items[0].Time, 1*time.Second) truncateTestData(t) @@ -180,7 +181,7 @@ func TestImportListenBrainz(t *testing.T) { track, err := store.GetTrack(context.Background(), db.GetTrackOpts{MusicBrainzID: uuid.MustParse("08e8f55b-f1a4-46b8-b2d1-fab4c592165c")}) require.NoError(t, err) assert.Equal(t, "Desert", track.Title) - listens, err := store.GetListensPaginated(context.Background(), db.GetItemsOpts{TrackID: int(track.ID)}) + listens, err := store.GetListensPaginated(context.Background(), db.GetItemsOpts{TrackID: int(track.ID), Period: db.PeriodAllTime}) require.NoError(t, err) assert.Len(t, listens.Items, 1) assert.WithinDuration(t, time.Unix(1749780612, 0), listens.Items[0].Time, 1*time.Second)