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

Function envOptionToConfig

tools/compiler/compiler_test.go:359–370  ·  view source on GitHub ↗
(t *testing.T, name string, opts ...cel.EnvOption)

Source from the content-addressed store, hash-verified

357}
358
359func envOptionToConfig(t *testing.T, name string, opts ...cel.EnvOption) (*env.Config, error) {
360 t.Helper()
361 e, err := cel.NewCustomEnv(opts...)
362 if err != nil {
363 return nil, err
364 }
365 conf, err := e.ToConfig(name)
366 if err != nil {
367 return nil, err
368 }
369 return conf, nil
370}
371
372func TestFileExpressionCustomPolicyParser(t *testing.T) {
373 t.Run("test file expression custom policy parser", func(t *testing.T) {

Callers 2

configFromEnvProtoFunction · 0.85
parseEnvFunction · 0.85

Calls 2

NewCustomEnvFunction · 0.92
ToConfigMethod · 0.65

Tested by

no test coverage detected