Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for WithWarningRecorder (0.39 sec)

  1. pkg/registry/batch/job/storage/storage_test.go

    			defer server.Terminate(t)
    			defer storage.Job.Store.DestroyFunc()
    			dc := dummyRecorder{agent: "", text: ""}
    			ctx = genericapirequest.WithRequestInfo(ctx, test.requestInfo)
    			ctxWithRecorder := warning.WithWarningRecorder(ctx, &dc)
    			// Create the object
    			if err := storage.Job.Storage.Create(ctxWithRecorder, key, job, nil, 0, false); err != nil {
    				t.Fatalf("unexpected error: %v", err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 15 14:34:53 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/admission_test.go

    	})
    
    	testContext := setupFakeTest(t, compiler, matcher)
    	require.NoError(t, testContext.UpdateAndWait(fakeParams, denyPolicy, denyBinding))
    
    	warningRecorder := newWarningRecorder()
    	warnCtx := warning.WithWarningRecorder(testContext, warningRecorder)
    	attr := attributeRecord(nil, fakeParams, admission.Create)
    	err := testContext.Plugin.Dispatch(
    		warnCtx,
    		// Object is irrelevant/unchecked for this test. Just test that
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 25 01:39:01 UTC 2024
    - 63.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/server/config.go

    	handler = genericfilters.WithCORS(handler, c.CorsAllowedOriginList, nil, nil, nil, "true")
    
    	// WithWarningRecorder must be wrapped by the timeout handler
    	// to make the addition of warning headers threadsafe
    	handler = genericapifilters.WithWarningRecorder(handler)
    
    	// WithTimeoutForNonLongRunningRequests will call the rest of the request handling in a go-routine with the
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 47.7K bytes
    - Viewed (0)
  4. pkg/registry/core/pod/strategy_test.go

    			assert.Nil(t, pod.Spec.Containers[0].SecurityContext)
    		},
    	}}
    
    	for _, test := range tests {
    		t.Run(test.description, func(t *testing.T) {
    			warnings := &warningRecorder{}
    			ctx := warning.WithWarningRecorder(context.Background(), warnings)
    			applyAppArmorVersionSkew(ctx, test.pod)
    			test.validation(t, test.pod)
    
    			if test.expectWarning {
    				if assert.NotEmpty(t, warnings.warnings, "expect warnings") {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 76.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    		t.Run(c.name, func(t *testing.T) {
    			validator := NewValidator(c.schema, false, celconfig.PerCallLimit)
    			require.NotNil(t, validator)
    			recorder := &warningRecorder{}
    			ctx := warning.WithWarningRecorder(context.TODO(), recorder)
    			budget := c.runtimeCostBudget
    			if budget == 0 {
    				budget = celconfig.RuntimeCELCostBudget
    			}
    			errs, _ := validator.Validate(
    				ctx,
    				field.NewPath("root"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
Back to top