Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for mustCreateEnv (0.11 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/mutation/env_test.go

    import (
    	"testing"
    
    	"github.com/google/cel-go/cel"
    
    	"k8s.io/apimachinery/pkg/util/version"
    	"k8s.io/apiserver/pkg/cel/environment"
    )
    
    // mustCreateEnv creates the default env for testing, with given option.
    // it fatally fails the test if the env fails to set up.
    func mustCreateEnv(t testing.TB, envOptions ...cel.EnvOption) *cel.Env {
    	envSet, err := environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), true).
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/mutation/unstructured/typeresolver_test.go

    			expectedValue: true,
    		},
    	} {
    		t.Run(tc.name, func(t *testing.T) {
    			_, option := mutation.NewTypeProviderAndEnvOption(&TypeResolver{})
    			env := mustCreateEnv(t, option)
    			ast, issues := env.Compile(tc.expression)
    			if issues != nil {
    				t.Fatalf("unexpected issues during compilation: %v", issues)
    			}
    			program, err := env.Program(ast)
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 3.9K bytes
    - Viewed (0)
Back to top