Skip to content

Commit b65000d

Browse files
committed
test: merge resolver_cache_integration_test.go into resolver_cache_test.go
1 parent f702dc4 commit b65000d

File tree

2 files changed

+11
-234
lines changed

2 files changed

+11
-234
lines changed

test/resolver_cache_integration_test.go

Lines changed: 0 additions & 234 deletions
This file was deleted.

test/resolver_cache_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import (
4343
const (
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

Comments
 (0)