TestComputeIntegrityCacheKey_NoPolicy verifies that computeIntegrityCacheKey uses the nopolicy sentinel for workflows without a guard policy.
(t *testing.T)
| 331 | // TestComputeIntegrityCacheKey_NoPolicy verifies that computeIntegrityCacheKey uses |
| 332 | // the nopolicy sentinel for workflows without a guard policy. |
| 333 | func 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. |
nothing calls this directly
no test coverage detected