Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 111 for tc (0.03 sec)

  1. pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go

    		},
    	}
    
    	for name, tc := range testcases {
    		t.Run(name, func(t *testing.T) {
    			tCtx := ktesting.Init(t)
    
    			controller, createErr := NewClaimController(tc.filter, tc.requests)
    			if createErr != nil {
    				if !tc.expectCreateErr {
    					tCtx.Fatalf("unexpected create error: %v", createErr)
    				}
    				return
    			}
    			if tc.expectCreateErr {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 27 09:27:01 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/authentication/cel/compile_test.go

    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			for _, expressionAccessor := range tc.expressionAccessors {
    				_, err := compiler.CompileClaimsExpression(expressionAccessor)
    				if err == nil {
    					t.Errorf("expected error but got nil")
    				}
    				if !strings.Contains(err.Error(), tc.wantErr) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. pkg/config/analysis/analyzers/multicluster_analyzers_test.go

    	// For each test case, verify we get the expected messages as output
    	for _, tc := range mcTestGrid {
    		tc := tc // Capture range variable so subtests work correctly
    		t.Run(tc.name, func(t *testing.T) {
    			g := NewWithT(t)
    
    			// Set up a hook to record which collections are accessed by each analyzer
    			analyzerName := tc.analyzer.Metadata().Name
    			cr := func(col config.GroupVersionKind) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 08:32:06 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/testsanitizers/libfuzzer_test.go

    		expectedError string
    	}{
    		{goSrc: "libfuzzer1.go", expectedError: "panic: found it"},
    		{goSrc: "libfuzzer2.go", cSrc: "libfuzzer2.c", expectedError: "panic: found it"},
    	}
    	for _, tc := range cases {
    		tc := tc
    		name := strings.TrimSuffix(tc.goSrc, ".go")
    		t.Run(name, func(t *testing.T) {
    			t.Parallel()
    
    			dir := newTempDir(t)
    			defer dir.RemoveAll(t)
    
    			// build Go code in libfuzzer mode to a c-archive
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 00:12:03 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  5. pkg/api/persistentvolume/util_test.go

    		},
    	}
    
    	for name, tc := range tests {
    		t.Run(name, func(t *testing.T) {
    			featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.VolumeAttributesClass, tc.vacEnabled)
    
    			DropDisabledSpecFields(tc.newSpec, tc.oldSpec)
    			if !reflect.DeepEqual(tc.newSpec, tc.expectNewSpec) {
    				t.Error(cmp.Diff(tc.newSpec, tc.expectNewSpec))
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/authorization/cel/compile_test.go

    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			_, err := compiler.CompileCELExpression(&SubjectAccessReviewMatchCondition{
    				Expression: tc.expression,
    			})
    			if len(tc.expectedError) > 0 && (err == nil || !strings.Contains(err.Error(), tc.expectedError)) {
    				t.Fatalf("expected error: %s compiling expression %s, got: %v", tc.expectedError, tc.expression, err)
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  7. callbacks/helper_test.go

    				Columns: []clause.Column{{Name: "active"}},
    				Values:  [][]interface{}{{true}},
    			},
    		},
    	}
    
    	for _, tc := range testCase {
    		t.Run(tc.name, func(t *testing.T) {
    			actual := ConvertMapToValuesForCreate(&gorm.Statement{}, tc.input)
    			if !reflect.DeepEqual(actual, tc.expect) {
    				t.Errorf("expect %v got %v", tc.expect, actual)
    			}
    		})
    	}
    }
    
    func TestConvertSliceOfMapToValuesForCreate(t *testing.T) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 05 02:22:57 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  8. src/internal/syscall/unix/siginfo_linux_test.go

    		{"Pid", unsafe.Offsetof(si.Pid), ofPid},
    		{"Uid", unsafe.Offsetof(si.Uid), ofUid},
    		{"Status", unsafe.Offsetof(si.Status), ofStatus},
    	}
    
    	for _, tc := range offsets {
    		if int(tc.got) != tc.want {
    			t.Errorf("offsetof %s: got %d, want %d", tc.name, tc.got, tc.want)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 01:23:00 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/cel/mutation/optional_test.go

    			expectedVal: celtypes.True,
    		},
    	} {
    		t.Run(tc.name, func(t *testing.T) {
    			_, option := NewTypeProviderAndEnvOption(&mockTypeResolverForOptional{
    				mockTypeResolver: &mockTypeResolver{},
    			})
    			env := mustCreateEnvWithOptional(t, option)
    			ast, issues := env.Compile(tc.expression)
    			if issues != nil {
    				if tc.expectedCompileError == "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jan 25 21:52:39 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  10. pkg/kubelet/winstats/perfcounters_test.go

    			expectedErrMsg: "unable to add process counter: foo. Error code is c0000bc0",
    		},
    	}
    
    	for name, tc := range testCases {
    		t.Run(name, func(t *testing.T) {
    			counter, err := newPerfCounter(tc.counter)
    			if tc.expectErr {
    				if err == nil || err.Error() != tc.expectedErrMsg {
    					t.Fatalf("expected error message `%s` but got `%v`", tc.expectedErrMsg, err)
    				}
    				return
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top