@@ -23,6 +23,8 @@ import (
23
23
//go:embed fixtures/test-images.json
24
24
var testImages []byte
25
25
26
+ const lastPatchedAnnotation = "sh.copa.image.patched"
27
+
26
28
type testImage struct {
27
29
OriginalImage string `json:"originalImage"`
28
30
LocalImage string `json:"localImage"`
@@ -409,11 +411,11 @@ func verifyAnnotations(t *testing.T, patchedRef string, platforms []string, repo
409
411
t .Logf ("platform %s has updated created timestamp: %s" , platformStr , createdTime )
410
412
}
411
413
412
- // Check for Copa last .patched annotation on patched platforms
413
- lastPatched , exists := manifestEntry .Annotations ["sh.copa.last.patched" ]
414
- assert .True (t , exists , "patched platform %s should have sh.copa.last.patched annotation" , platformStr )
415
- assert .NotEmpty (t , lastPatched , "sh.copa.last.patched timestamp should not be empty for patched platform %s" , platformStr )
416
- t .Logf ("platform %s has Copa last.patched timestamp: %s" , platformStr , lastPatched )
414
+ // Check for Copa image .patched annotation on patched platforms
415
+ lastPatched , exists := manifestEntry .Annotations [lastPatchedAnnotation ]
416
+ assert .True (t , exists , "patched platform %s should have %s annotation" , platformStr , lastPatchedAnnotation )
417
+ assert .NotEmpty (t , lastPatched , "%s timestamp should not be empty for patched platform %s" , lastPatchedAnnotation , platformStr )
418
+ t .Logf ("platform %s has %s timestamp: %s" , platformStr , lastPatchedAnnotation , lastPatched )
417
419
418
420
t .Logf ("platform %s has %d manifest-level annotations" , platformStr , len (manifestEntry .Annotations ))
419
421
@@ -452,9 +454,9 @@ func verifyAnnotations(t *testing.T, patchedRef string, platforms []string, repo
452
454
} else {
453
455
t .Logf ("checking platform %s (no vulnerability report, not patched)" , platformStr )
454
456
455
- // Non-patched platforms should NOT have the Copa last .patched annotation
456
- _ , exists := manifestEntry .Annotations ["sh.copa.last .patched" ]
457
- assert .False (t , exists , "non-patched platform %s should not have sh.copa.last .patched annotation" , platformStr )
457
+ // Non-patched platforms should NOT have the Copa image .patched annotation
458
+ _ , exists := manifestEntry .Annotations ["sh.copa.image .patched" ]
459
+ assert .False (t , exists , "non-patched platform %s should not have sh.copa.image .patched annotation" , platformStr )
458
460
}
459
461
}
460
462
}
0 commit comments