Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,281 for testCases (0.15 sec)

  1. staging/src/k8s.io/apiserver/pkg/admission/plugin/resourcequota/admission_test.go

    		},
    	}
    	for i, testCase := range testCases {
    		result := prettyPrint(testCase.input)
    		if result != testCase.expected {
    			t.Errorf("Pretty print did not give stable sorted output[%d], expected %v, but got %v", i, testCase.expected, result)
    		}
    	}
    }
    
    func TestHasUsageStats(t *testing.T) {
    	testCases := map[string]struct {
    		a        corev1.ResourceQuota
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 23 10:34:50 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  2. pkg/apis/apps/v1beta2/conversion_test.go

    	}
    	apiTemplate := api.PodTemplateSpec{
    		ObjectMeta: metav1.ObjectMeta{Name: "foo"},
    		Spec: api.PodSpec{
    			RestartPolicy:   api.RestartPolicy("bar"),
    			SecurityContext: new(api.PodSecurityContext),
    		},
    	}
    	testcases := map[string]struct {
    		stsSpec1 *apps.StatefulSetSpec
    		stsSepc2 *v1beta2.StatefulSetSpec
    	}{
    		"StatefulSetSpec Conversion 1": {
    			stsSpec1: &apps.StatefulSetSpec{
    				Replicas: *replicas,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 07:16:15 UTC 2023
    - 22.7K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/errors/errors_test.go

    			nil,
    			&metav1.StatusDetails{
    				Kind:   "Kind",
    				Name:   "name",
    				Causes: []metav1.StatusCause{},
    			},
    			`Kind "name" is invalid`,
    		},
    	}
    	for i, testCase := range testCases {
    		vErr, expected := testCase.Err, testCase.Details
    		if vErr != nil && expected != nil {
    			expected.Causes[0].Message = vErr.ErrorBody()
    		}
    		var errList field.ErrorList
    		if vErr != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  4. pkg/apis/apps/v1/conversion_test.go

    	}
    	apiTemplate := api.PodTemplateSpec{
    		ObjectMeta: metav1.ObjectMeta{Name: "foo"},
    		Spec: api.PodSpec{
    			RestartPolicy:   api.RestartPolicy("bar"),
    			SecurityContext: new(api.PodSecurityContext),
    		},
    	}
    	testcases := map[string]struct {
    		stsSpec1 *apps.StatefulSetSpec
    		stsSepc2 *appsv1.StatefulSetSpec
    	}{
    		"StatefulSetSpec Conversion 1": {
    			stsSpec1: &apps.StatefulSetSpec{
    				Replicas: *replicas,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 07:16:15 UTC 2023
    - 20.1K bytes
    - Viewed (0)
  5. internal/config/lambda/event/arn_test.go

    	}
    
    	for i, testCase := range testCases {
    		arn, err := ParseARN(testCase.s)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			if *arn != *testCase.expectedARN {
    				t.Fatalf("test %v: data: expected: %v, got: %v", i+1, testCase.expectedARN, arn)
    			}
    		}
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Mar 07 16:12:41 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  6. pkg/controller/ttl/ttl_controller_test.go

    			expectedTTL:  300,
    		},
    	}
    
    	for i, testCase := range testCases {
    		ttlController := &Controller{
    			queue:             workqueue.NewTypedRateLimitingQueue(workqueue.DefaultTypedControllerRateLimiter[string]()),
    			nodeCount:         testCase.nodeCount,
    			desiredTTLSeconds: testCase.desiredTTL,
    			boundaryStep:      testCase.boundaryStep,
    		}
    		if testCase.addNode {
    			logger, _ := ktesting.NewTestContext(t)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  7. src/image/color/color_test.go

    			d = uint32(x - y)
    		} else {
    			d = uint32(y - x)
    		}
    		return (d * d) >> 2
    	}
    	testCases := []uint32{
    		0,
    		1,
    		2,
    		0x0fffd,
    		0x0fffe,
    		0x0ffff,
    		0x10000,
    		0x10001,
    		0x10002,
    		0xfffffffd,
    		0xfffffffe,
    		0xffffffff,
    	}
    	for _, x := range testCases {
    		for _, y := range testCases {
    			if got, want := sqDiff(x, y), orig(x, y); got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 27 05:47:09 UTC 2017
    - 890 bytes
    - Viewed (0)
  8. cmd/handler-utils_test.go

    		{malformedReq, globalMinioDefaultRegion, ErrMalformedXML},
    	}
    
    	for i, testCase := range testCases {
    		config.SetRegion(globalServerConfig, testCase.serverConfigRegion)
    		_, actualCode := parseLocationConstraint(testCase.request)
    		if testCase.expectedCode != actualCode {
    			t.Errorf("Test %d: Expected the APIErrCode to be %d, but instead found %d", i+1, testCase.expectedCode, actualCode)
    		}
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/request/seat_seconds_test.go

    	}
    	for _, testCase := range testCases {
    		actualStr := testCase.ss.String()
    		if actualStr != testCase.expectStr {
    			t.Errorf("SeatSeconds(%d).String() is %q but expected %q", uint64(testCase.ss), actualStr, testCase.expectStr)
    		}
    		actualFloat := testCase.ss.ToFloat()
    		if math.Round(actualFloat*ssScale) != math.Round(testCase.expectFloat*ssScale) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 29 20:20:16 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/cmd/completion_test.go

    		t.Errorf(shellsError)
    	}
    	for _, shell := range shells {
    		test := TestCase{
    			name: "valid: test shell " + shell,
    			args: []string{shell},
    		}
    		testCases = append(testCases, test)
    	}
    
    	// use dummy cobra commands
    	parentCmd := &cobra.Command{}
    	cmd := &cobra.Command{}
    	parentCmd.AddCommand(cmd)
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 06 02:59:58 UTC 2022
    - 2.4K bytes
    - Viewed (0)
Back to top