@@ -43,6 +43,7 @@ import (
4343const (
4444 cacheAnnotationKey = "resolution.tekton.dev/cached"
4545 cacheResolverTypeKey = "resolution.tekton.dev/cache-resolver-type"
46+ cacheTimestampKey = "resolution.tekton.dev/cache-timestamp"
4647 cacheValueTrue = "true"
4748)
4849
@@ -190,6 +191,11 @@ spec:
190191 t .Errorf ("Expected resolver type 'bundles', got '%s'" , resolutionRequest2 .Status .Annotations [cacheResolverTypeKey ])
191192 }
192193
194+ // Verify timestamp annotation is present
195+ if timestamp , exists := resolutionRequest2 .Status .Annotations [cacheTimestampKey ]; ! exists || timestamp == "" {
196+ t .Errorf ("Expected cache timestamp annotation, got: %v" , resolutionRequest2 .Status .Annotations )
197+ }
198+
193199 // Verify resolver logs show cache behavior
194200 logs := getResolverPodLogs (ctx , t , c )
195201
@@ -490,6 +496,11 @@ spec:
490496 t .Errorf ("Expected resolver type 'cluster', got '%s'" , resolutionRequest2 .Status .Annotations [cacheResolverTypeKey ])
491497 }
492498
499+ // Verify timestamp annotation is present
500+ if timestamp , exists := resolutionRequest2 .Status .Annotations [cacheTimestampKey ]; ! exists || timestamp == "" {
501+ t .Errorf ("Expected cache timestamp annotation, got: %v" , resolutionRequest2 .Status .Annotations )
502+ }
503+
493504 // Test 3: Request with different parameters should not be cached
494505 tr3 := createClusterTaskRun (t , namespace , "test-cluster-3" , taskName , "never" )
495506 _ , err = c .V1TaskRunClient .Create (ctx , tr3 , metav1.CreateOptions {})
0 commit comments