Add deterministic analysis input identities
This commit is contained in:
@@ -157,6 +157,18 @@ func TestHydrateAnalyzeArtifactsUsesOnlyCurrentConfiguredKeys(t *testing.T) {
|
||||
if !entry.Available || entry.Provenance != ArtifactProvenanceCurrentAnalyzeManifest || entry.ProducerRunID != "run-1" {
|
||||
t.Fatalf("entry = %#v", entry)
|
||||
}
|
||||
record := m.Stages["analyze"].AnalyzeArtifacts["session_recap"]
|
||||
if entry.Checksum != record.Output.Checksum || entry.Size != record.OutputSize {
|
||||
t.Fatalf("entry content identity = (%q, %d), want (%q, %d)", entry.Checksum, entry.Size, record.Output.Checksum, record.OutputSize)
|
||||
}
|
||||
if entry.Contract == nil || *entry.Contract != *record.Output.Contract {
|
||||
t.Fatalf("entry contract = %#v, want %#v", entry.Contract, record.Output.Contract)
|
||||
}
|
||||
entry.Contract.SchemaVersion = "mutated"
|
||||
again, _ := catalog.Lookup(ConfiguredArtifactSourceID("session_recap"))
|
||||
if again.Contract == nil || again.Contract.SchemaVersion != "1" {
|
||||
t.Fatalf("catalog contract was mutated through lookup: %#v", again.Contract)
|
||||
}
|
||||
if _, ok := catalog.Lookup(ConfiguredArtifactSourceID("removed")); ok {
|
||||
t.Fatal("removed manifest record was advertised in current catalog")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user