Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for WithWarningRecorder (0.22 sec)

  1. 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)
  2. 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)
Back to top