MCPcopy Create free account
hub / github.com/github/gh-aw / TestComputeIntegrityCacheKey_NoPolicy

Function TestComputeIntegrityCacheKey_NoPolicy

pkg/workflow/cache_integrity_test.go:333–339  ·  view source on GitHub ↗

TestComputeIntegrityCacheKey_NoPolicy verifies that computeIntegrityCacheKey uses the nopolicy sentinel for workflows without a guard policy.

(t *testing.T)

Source from the content-addressed store, hash-verified

331// TestComputeIntegrityCacheKey_NoPolicy verifies that computeIntegrityCacheKey uses
332// the nopolicy sentinel for workflows without a guard policy.
333func TestComputeIntegrityCacheKey_NoPolicy(t *testing.T) {
334 entry := CacheMemoryEntry{ID: "default"}
335 key := computeIntegrityCacheKey(entry, nil)
336
337 assert.True(t, strings.HasPrefix(key, "memory-none-nopolicy-"),
338 "Cache key without policy should start with 'memory-none-nopolicy-', got: %s", key)
339}
340
341// TestComputeIntegrityCacheKey_CustomKey verifies that custom keys get the integrity prefix
342// to prevent cross-integrity cache sharing.

Callers

nothing calls this directly

Calls 1

computeIntegrityCacheKeyFunction · 0.85

Tested by

no test coverage detected