MCPcopy Create free account
hub / github.com/cel-expr/cel-go / readPolicy

Function readPolicy

policy/helper_test.go:284–291  ·  view source on GitHub ↗
(t testing.TB, fileName string)

Source from the content-addressed store, hash-verified

282)
283
284func readPolicy(t testing.TB, fileName string) *Source {
285 t.Helper()
286 policyBytes, err := os.ReadFile(fileName)
287 if err != nil {
288 t.Fatalf("os.ReadFile(%s) failed: %v", fileName, err)
289 }
290 return ByteSource(policyBytes, fileName)
291}
292
293func readPolicyConfig(t testing.TB, fileName string) *env.Config {
294 t.Helper()

Callers 2

TestParseFunction · 0.85
parsePolicyFunction · 0.85

Calls 1

ByteSourceFunction · 0.85

Tested by

no test coverage detected