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

Function readPolicyConfig

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

Source from the content-addressed store, hash-verified

291}
292
293func readPolicyConfig(t testing.TB, fileName string) *env.Config {
294 t.Helper()
295 testCaseBytes, err := os.ReadFile(fileName)
296 if err != nil {
297 t.Fatalf("os.ReadFile(%s) failed: %v", fileName, err)
298 }
299 config := &env.Config{}
300 err = yaml.Unmarshal(testCaseBytes, config)
301 if err != nil {
302 log.Fatalf("yaml.Unmarshal(%s) error: %v", fileName, err)
303 }
304 return config
305}
306
307func readTestSuite(t testing.TB, fileName string) *test.Suite {
308 t.Helper()

Callers 2

compileRuleMethod · 0.85
compileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected