Compare recent changes from module snapshots
This commit is contained in:
@@ -252,8 +252,9 @@ func (s *FilesystemStore) FindPriorSnapshot(_ context.Context, resolved report.R
|
||||
return candidates[i].GeneratedAt.After(candidates[j].GeneratedAt)
|
||||
})
|
||||
return &PriorSnapshot{
|
||||
Metadata: candidates[0],
|
||||
BriefingPath: candidates[0].BriefingPath,
|
||||
Metadata: candidates[0],
|
||||
BriefingPath: candidates[0].BriefingPath,
|
||||
ModuleSnapshotPath: candidates[0].ModuleSnapshotPath,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -268,6 +268,9 @@ func TestFindPriorSnapshot(t *testing.T) {
|
||||
if prior.BriefingPath != briefingPath {
|
||||
t.Fatalf("BriefingPath = %q, want %q", prior.BriefingPath, briefingPath)
|
||||
}
|
||||
if prior.ModuleSnapshotPath != paths.ModuleSnapshot {
|
||||
t.Fatalf("ModuleSnapshotPath = %q, want %q", prior.ModuleSnapshotPath, paths.ModuleSnapshot)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFindPriorSnapshotUsesValidDate(t *testing.T) {
|
||||
|
||||
@@ -27,8 +27,9 @@ type Store interface {
|
||||
}
|
||||
|
||||
type PriorSnapshot struct {
|
||||
Metadata Metadata
|
||||
BriefingPath string
|
||||
Metadata Metadata
|
||||
BriefingPath string
|
||||
ModuleSnapshotPath string
|
||||
}
|
||||
|
||||
type PreflightArtifact struct {
|
||||
|
||||
Reference in New Issue
Block a user