Sync hardware ingest contract v2.7

This commit is contained in:
Mikhail Chusavitin
2026-03-15 23:03:38 +03:00
parent 72cf482ad3
commit 78c6dfc0ef
12 changed files with 200 additions and 176 deletions

View File

@@ -39,7 +39,7 @@ func TestFinalizeSnapshotFiltersComponentsWithoutRequiredSerials(t *testing.T) {
}
}
func TestFinalizeSnapshotDeduplicatesSerials(t *testing.T) {
func TestFinalizeSnapshotPreservesDuplicateSerials(t *testing.T) {
collectedAt := "2026-03-15T12:00:00Z"
status := statusOK
model := "Device"
@@ -57,7 +57,7 @@ func TestFinalizeSnapshotDeduplicatesSerials(t *testing.T) {
if got := *snap.Storage[0].SerialNumber; got != serial {
t.Fatalf("first serial changed: %q", got)
}
if got := *snap.Storage[1].SerialNumber; got != "NO_SN-00000001" {
t.Fatalf("duplicate serial mismatch: %q", got)
if got := *snap.Storage[1].SerialNumber; got != serial {
t.Fatalf("duplicate serial should stay unchanged: %q", got)
}
}