@@ -2081,7 +2081,7 @@ func TestBuildResultDisplay(t *testing.T) {
20812081 name : "failed with fallback for all" ,
20822082 data : AllSectionsData {
20832083 OverallPassed : false ,
2084- FallbackUsed : true ,
2084+ FallbackUsed : true ,
20852085 FallbackCount : 2 ,
20862086 TotalImages : 2 ,
20872087 ImageStatuses : []ImageStatus {
@@ -2103,7 +2103,7 @@ func TestBuildResultDisplay(t *testing.T) {
21032103 name : "failed with fallback for some" ,
21042104 data : AllSectionsData {
21052105 OverallPassed : false ,
2106- FallbackUsed : true ,
2106+ FallbackUsed : true ,
21072107 FallbackCount : 1 ,
21082108 TotalImages : 3 ,
21092109 ImageStatuses : []ImageStatus {
@@ -2127,8 +2127,8 @@ func TestBuildResultDisplay(t *testing.T) {
21272127 name : "empty images" ,
21282128 data : AllSectionsData {
21292129 OverallPassed : true ,
2130- FallbackUsed : false ,
2131- TotalImages : 0 ,
2130+ FallbackUsed : false ,
2131+ TotalImages : 0 ,
21322132 ImageStatuses : []ImageStatus {},
21332133 },
21342134 expected : ResultDisplay {
@@ -2277,9 +2277,9 @@ func TestBuildVSASummaryDisplay(t *testing.T) {
22772277 FallbackReasons : map [string ]bool {},
22782278 },
22792279 expected : VSASummaryDisplay {
2280- Signature : "VERIFIED" ,
2281- Predicate : "passed (3/3)" ,
2282- Policy : "matches (no differences)" ,
2280+ Signature : "VERIFIED" ,
2281+ Predicate : "passed (3/3)" ,
2282+ Policy : "matches (no differences)" ,
22832283 FallbackReasons : "" ,
22842284 },
22852285 },
@@ -2296,14 +2296,14 @@ func TestBuildVSASummaryDisplay(t *testing.T) {
22962296 "def67890" : {Added : 0 , Removed : 1 , Changed : 1 },
22972297 },
22982298 FallbackReasons : map [string ]bool {
2299- "no_vsa" : true ,
2299+ "no_vsa" : true ,
23002300 "expired" : true ,
23012301 },
23022302 },
23032303 expected : VSASummaryDisplay {
2304- Signature : "NOT VERIFIED" ,
2305- Predicate : "failed (2/2)" ,
2306- Policy : "mismatches on 2/2 images (adds=1, removes=3, changes=1)" ,
2304+ Signature : "NOT VERIFIED" ,
2305+ Predicate : "failed (2/2)" ,
2306+ Policy : "mismatches on 2/2 images (adds=1, removes=3, changes=1)" ,
23072307 FallbackReasons : "expired, no_vsa" ,
23082308 },
23092309 },
@@ -2323,9 +2323,9 @@ func TestBuildVSASummaryDisplay(t *testing.T) {
23232323 },
23242324 },
23252325 expected : VSASummaryDisplay {
2326- Signature : "VERIFIED" ,
2327- Predicate : "mixed (passed: 2, failed: 1)" ,
2328- Policy : "mismatches on 1/3 images (adds=1, removes=0, changes=0)" ,
2326+ Signature : "VERIFIED" ,
2327+ Predicate : "mixed (passed: 2, failed: 1)" ,
2328+ Policy : "mismatches on 1/3 images (adds=1, removes=0, changes=0)" ,
23292329 FallbackReasons : "policy_mismatch" ,
23302330 },
23312331 },
@@ -2340,9 +2340,9 @@ func TestBuildVSASummaryDisplay(t *testing.T) {
23402340 FallbackReasons : map [string ]bool {},
23412341 },
23422342 expected : VSASummaryDisplay {
2343- Signature : "VERIFIED" ,
2344- Predicate : "(no predicate data)" ,
2345- Policy : "(no policy data)" ,
2343+ Signature : "VERIFIED" ,
2344+ Predicate : "(no predicate data)" ,
2345+ Policy : "(no policy data)" ,
23462346 FallbackReasons : "" ,
23472347 },
23482348 },
@@ -2368,9 +2368,9 @@ func TestVSASummaryDisplay_String(t *testing.T) {
23682368 {
23692369 name : "all passed, no fallback reasons" ,
23702370 display : VSASummaryDisplay {
2371- Signature : "VERIFIED" ,
2372- Predicate : "passed (3/3)" ,
2373- Policy : "matches (no differences)" ,
2371+ Signature : "VERIFIED" ,
2372+ Predicate : "passed (3/3)" ,
2373+ Policy : "matches (no differences)" ,
23742374 FallbackReasons : "" ,
23752375 },
23762376 expected : `VSA Summary
@@ -2382,9 +2382,9 @@ func TestVSASummaryDisplay_String(t *testing.T) {
23822382 {
23832383 name : "all failed, with fallback reasons" ,
23842384 display : VSASummaryDisplay {
2385- Signature : "NOT VERIFIED" ,
2386- Predicate : "failed (2/2)" ,
2387- Policy : "mismatches on 2/2 images (adds=1, removes=3, changes=1)" ,
2385+ Signature : "NOT VERIFIED" ,
2386+ Predicate : "failed (2/2)" ,
2387+ Policy : "mismatches on 2/2 images (adds=1, removes=3, changes=1)" ,
23882388 FallbackReasons : "expired, no_vsa" ,
23892389 },
23902390 expected : `VSA Summary
@@ -2397,9 +2397,9 @@ func TestVSASummaryDisplay_String(t *testing.T) {
23972397 {
23982398 name : "mixed results with fallback" ,
23992399 display : VSASummaryDisplay {
2400- Signature : "VERIFIED" ,
2401- Predicate : "mixed (passed: 2, failed: 1)" ,
2402- Policy : "mismatches on 1/3 images (adds=1, removes=0, changes=0)" ,
2400+ Signature : "VERIFIED" ,
2401+ Predicate : "mixed (passed: 2, failed: 1)" ,
2402+ Policy : "mismatches on 1/3 images (adds=1, removes=0, changes=0)" ,
24032403 FallbackReasons : "policy_mismatch" ,
24042404 },
24052405 expected : `VSA Summary
@@ -2412,9 +2412,9 @@ func TestVSASummaryDisplay_String(t *testing.T) {
24122412 {
24132413 name : "no predicate or policy data" ,
24142414 display : VSASummaryDisplay {
2415- Signature : "VERIFIED" ,
2416- Predicate : "(no predicate data)" ,
2417- Policy : "(no policy data)" ,
2415+ Signature : "VERIFIED" ,
2416+ Predicate : "(no predicate data)" ,
2417+ Policy : "(no policy data)" ,
24182418 FallbackReasons : "" ,
24192419 },
24202420 expected : `VSA Summary
@@ -2471,7 +2471,7 @@ func TestBuildPolicyDiffDisplay(t *testing.T) {
24712471 {
24722472 name : "policy diff with all changes" ,
24732473 data : AllSectionsData {
2474- HasPolicyDiff : true ,
2474+ HasPolicyDiff : true ,
24752475 AffectedImages : []string {"abc12345" , "def67890" },
24762476 PolicyDiffCounts : map [string ]PolicyDiffCounts {
24772477 "abc12345" : {Added : 2 , Removed : 1 , Changed : 0 },
@@ -2488,7 +2488,7 @@ func TestBuildPolicyDiffDisplay(t *testing.T) {
24882488 {
24892489 name : "policy diff with only added" ,
24902490 data : AllSectionsData {
2491- HasPolicyDiff : true ,
2491+ HasPolicyDiff : true ,
24922492 AffectedImages : []string {"abc12345" },
24932493 PolicyDiffCounts : map [string ]PolicyDiffCounts {
24942494 "abc12345" : {Added : 5 , Removed : 0 , Changed : 0 },
@@ -2504,7 +2504,7 @@ func TestBuildPolicyDiffDisplay(t *testing.T) {
25042504 {
25052505 name : "policy diff with only removed" ,
25062506 data : AllSectionsData {
2507- HasPolicyDiff : true ,
2507+ HasPolicyDiff : true ,
25082508 AffectedImages : []string {"abc12345" },
25092509 PolicyDiffCounts : map [string ]PolicyDiffCounts {
25102510 "abc12345" : {Added : 0 , Removed : 3 , Changed : 0 },
@@ -2520,7 +2520,7 @@ func TestBuildPolicyDiffDisplay(t *testing.T) {
25202520 {
25212521 name : "policy diff with only changed" ,
25222522 data : AllSectionsData {
2523- HasPolicyDiff : true ,
2523+ HasPolicyDiff : true ,
25242524 AffectedImages : []string {"abc12345" },
25252525 PolicyDiffCounts : map [string ]PolicyDiffCounts {
25262526 "abc12345" : {Added : 0 , Removed : 0 , Changed : 4 },
@@ -2536,7 +2536,7 @@ func TestBuildPolicyDiffDisplay(t *testing.T) {
25362536 {
25372537 name : "policy diff with no changes" ,
25382538 data : AllSectionsData {
2539- HasPolicyDiff : true ,
2539+ HasPolicyDiff : true ,
25402540 AffectedImages : []string {"abc12345" },
25412541 PolicyDiffCounts : map [string ]PolicyDiffCounts {
25422542 "abc12345" : {Added : 0 , Removed : 0 , Changed : 0 },
@@ -2661,7 +2661,7 @@ func TestPolicyDiffDisplay_String(t *testing.T) {
26612661func TestBuildPolicyDiffDisplay_Integration (t * testing.T ) {
26622662 // Test end-to-end: build from AllSectionsData and format with String()
26632663 data := AllSectionsData {
2664- HasPolicyDiff : true ,
2664+ HasPolicyDiff : true ,
26652665 AffectedImages : []string {"abc12345" },
26662666 PolicyDiffCounts : map [string ]PolicyDiffCounts {
26672667 "abc12345" : {Added : 2 , Removed : 1 , Changed : 0 },
0 commit comments