Remove legacy daily report wrappers
This commit is contained in:
@@ -164,10 +164,6 @@ func (s *FilesystemStore) SaveMetadata(_ context.Context, metadata Metadata) (st
|
||||
return path, nil
|
||||
}
|
||||
|
||||
func (s *FilesystemStore) FindPriorDailySnapshot(ctx context.Context, resolved report.Resolved) (*PriorSnapshot, error) {
|
||||
return s.FindPriorSnapshot(ctx, resolved)
|
||||
}
|
||||
|
||||
func (s *FilesystemStore) FindPriorSnapshot(_ context.Context, resolved report.Resolved) (*PriorSnapshot, error) {
|
||||
if resolved.Definition.ComparisonStrategy != report.CompareSameValidDate && resolved.Definition.ComparisonStrategy != report.CompareWeekendWindow {
|
||||
return nil, nil
|
||||
|
||||
@@ -124,7 +124,7 @@ func TestSaveArtifactsAndMetadataRoundTrip(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestFindPriorDailySnapshot(t *testing.T) {
|
||||
func TestFindPriorSnapshot(t *testing.T) {
|
||||
store := newTestStore(t)
|
||||
first := resolveDailyAt(t, "2026-05-29T05:00:00-05:00")
|
||||
second := resolveDailyAt(t, "2026-05-29T08:00:00-05:00")
|
||||
@@ -148,12 +148,12 @@ func TestFindPriorDailySnapshot(t *testing.T) {
|
||||
t.Fatalf("SaveMetadata() error = %v", err)
|
||||
}
|
||||
|
||||
prior, err := store.FindPriorDailySnapshot(context.Background(), second)
|
||||
prior, err := store.FindPriorSnapshot(context.Background(), second)
|
||||
if err != nil {
|
||||
t.Fatalf("FindPriorDailySnapshot() error = %v", err)
|
||||
t.Fatalf("FindPriorSnapshot() error = %v", err)
|
||||
}
|
||||
if prior == nil {
|
||||
t.Fatal("FindPriorDailySnapshot() = nil, want prior snapshot")
|
||||
t.Fatal("FindPriorSnapshot() = nil, want prior snapshot")
|
||||
}
|
||||
if prior.Metadata.RunID != first.Metadata().RunID {
|
||||
t.Fatalf("RunID = %q, want %q", prior.Metadata.RunID, first.Metadata().RunID)
|
||||
@@ -163,7 +163,7 @@ func TestFindPriorDailySnapshot(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestFindPriorDailySnapshotUsesValidDate(t *testing.T) {
|
||||
func TestFindPriorSnapshotUsesValidDate(t *testing.T) {
|
||||
store := newTestStore(t)
|
||||
previousDate := resolveDailyAt(t, "2026-05-28T05:00:00-05:00")
|
||||
currentDate := resolveDailyAt(t, "2026-05-29T05:00:00-05:00")
|
||||
@@ -187,12 +187,12 @@ func TestFindPriorDailySnapshotUsesValidDate(t *testing.T) {
|
||||
t.Fatalf("SaveMetadata() error = %v", err)
|
||||
}
|
||||
|
||||
prior, err := store.FindPriorDailySnapshot(context.Background(), currentDate)
|
||||
prior, err := store.FindPriorSnapshot(context.Background(), currentDate)
|
||||
if err != nil {
|
||||
t.Fatalf("FindPriorDailySnapshot() error = %v", err)
|
||||
t.Fatalf("FindPriorSnapshot() error = %v", err)
|
||||
}
|
||||
if prior != nil {
|
||||
t.Fatalf("FindPriorDailySnapshot() = %#v, want nil for different valid date", prior)
|
||||
t.Fatalf("FindPriorSnapshot() = %#v, want nil for different valid date", prior)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ type Store interface {
|
||||
PrepareRenderedReport(context.Context, report.Resolved) (string, error)
|
||||
SaveMetadata(context.Context, Metadata) (string, error)
|
||||
FindPriorSnapshot(context.Context, report.Resolved) (*PriorSnapshot, error)
|
||||
FindPriorDailySnapshot(context.Context, report.Resolved) (*PriorSnapshot, error)
|
||||
LoadBriefing(context.Context, string) (briefing.Package, error)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user