Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 554 for tc (0.1 sec)

  1. pkg/apis/core/helper/helpers_test.go

    			},
    
    			output: true,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			s := core.Service{
    				Spec: tc.input,
    			}
    			if IsServiceIPSet(&s) != tc.output {
    				t.Errorf("case, input: %v, expected: %v, got: %v", tc.input, tc.output, !tc.output)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 9.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/cel/library/cost_test.go

    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			var targetNode checker.AstNode = testSizeNode{size: tc.targetSize}
    			argNodes := make([]checker.AstNode, len(tc.argSizes))
    			for i, arg := range tc.argSizes {
    				argNodes[i] = testSizeNode{size: arg}
    			}
    			result := est.EstimateCallCost(tc.function, tc.overload, &targetNode, argNodes)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  3. cmd/kube-proxy/app/server_test.go

    		baseYAML := fmt.Sprintf(
    			yamlTemplate, tc.bindAddress, tc.clusterCIDR,
    			tc.healthzBindAddress, tc.metricsBindAddress, tc.mode)
    
    		// Append additional configuration to the base yaml template
    		yaml := fmt.Sprintf("%s\n%s", baseYAML, tc.extraConfig)
    
    		config, err := options.loadConfig([]byte(yaml))
    
    		assert.NoError(t, err, "unexpected error for %s: %v", tc.name, err)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 05:08:41 UTC 2024
    - 32.3K bytes
    - Viewed (0)
  4. pkg/kubelet/cm/cpumanager/topology_hints_test.go

    		})
    		sort.SliceStable(tc.expectedHints, func(i, j int) bool {
    			return tc.expectedHints[i].LessThan(tc.expectedHints[j])
    		})
    		if !reflect.DeepEqual(tc.expectedHints, hints) {
    			t.Errorf("Expected in result to be %v , got %v", tc.expectedHints, hints)
    		}
    	}
    }
    
    func TestGetPodTopologyHints(t *testing.T) {
    	machineInfo := returnMachineInfo()
    
    	for _, tc := range returnTestCases() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 19K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/status_strategy_test.go

    					"spec":   "old",
    					"status": "new",
    				},
    			},
    		},
    	}
    	for index, tc := range tcs {
    		strategy.PrepareForUpdate(context.TODO(), tc.obj, tc.old)
    		if !reflect.DeepEqual(tc.obj, tc.expected) {
    			t.Errorf("test %d failed: expected: %v, got %v", index, tc.expected, tc.obj)
    		}
    	}
    }
    
    const listTypeResourceSchema = `
    apiVersion: apiextensions.k8s.io/v1
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 18 22:16:10 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  6. 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)
  7. pkg/registry/core/pod/strategy_test.go

    		},
    	}
    
    	for _, tc := range tcs {
    		indexValues, err := tc.indexFunc(tc.pod)
    		if !reflect.DeepEqual(err, tc.expectedErr) {
    			t.Errorf("name %v, expected %v, got %v", tc.name, tc.expectedErr, err)
    		}
    		if err == nil && len(indexValues) != 1 && indexValues[0] != tc.expectedValue {
    			t.Errorf("name %v, expected %v, got %v", tc.name, tc.expectedValue, indexValues)
    		}
    
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 76.2K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. staging/src/k8s.io/apiserver/pkg/authentication/serviceaccount/util_test.go

    			ExpectedErr: true,
    		},
    	}
    
    	for k, tc := range testCases {
    		username := MakeUsername(tc.Namespace, tc.Name)
    		if !MatchesUsername(tc.Namespace, tc.Name, username) {
    			t.Errorf("%s: Expected to match username", k)
    		}
    		namespace, name, err := SplitUsername(username)
    		if (err != nil) != tc.ExpectedErr {
    			t.Errorf("%s: Expected error=%v, got %v", k, tc.ExpectedErr, err)
    			continue
    		}
    		if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 21:15:10 UTC 2023
    - 7.7K bytes
    - Viewed (0)
Back to top