Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 1,054 for testCases (0.28 sec)

  1. pkg/kubelet/active_deadline_test.go

    	testCases := []struct {
    		pod      *v1.Pod
    		expected bool
    	}{{pods[0], true}, {pods[1], false}, {pods[2], false}, {pods[3], false}, {pods[4], false}}
    
    	for i, testCase := range testCases {
    		if actual := handler.ShouldSync(testCase.pod); actual != testCase.expected {
    			t.Errorf("[%d] ShouldSync expected %#v, got %#v", i, testCase.expected, actual)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 08 09:06:42 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  2. pkg/volume/util/volumeattributesclass_test.go

    		ObjectMeta: metav1.ObjectMeta{
    			Name: "my-vac7",
    			Annotations: map[string]string{
    				AlphaIsDefaultVolumeAttributesClassAnnotation: "true",
    			},
    		},
    		DriverName: dirverName2,
    	}
    
    	testCases := []struct {
    		name       string
    		driverName string
    		classes    []*storagev1alpha1.VolumeAttributesClass
    		expect     *storagev1alpha1.VolumeAttributesClass
    	}{
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Oct 31 03:18:56 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  3. cmd/xl-storage_test.go

    			expectedErr: errFileNameTooLong,
    		},
    	}
    
    	for i, testCase := range testCases {
    		if err := xlStorage.RenameFile(context.Background(), testCase.srcVol, testCase.srcPath, testCase.destVol, testCase.destPath); err != testCase.expectedErr {
    			t.Fatalf("TestXLStorage %d:  Expected the error to be : \"%v\", got: \"%v\".", i+1, testCase.expectedErr, err)
    		}
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 11 17:45:28 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  4. cmd/signature-v4-parser_test.go

    			expectedErrCode:  ErrNone,
    		},
    	}
    	for i, testCase := range testCases {
    		actualSignStr, actualErrCode := parseSignature(testCase.inputSignElement)
    		if testCase.expectedErrCode != actualErrCode {
    			t.Fatalf("Test %d: Expected the APIErrCode to be %d, got %d", i+1, testCase.expectedErrCode, actualErrCode)
    		}
    		if actualErrCode == ErrNone {
    			if testCase.expectedSignStr != actualSignStr {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 27.4K bytes
    - Viewed (0)
  5. cluster/images/etcd/migrate/options_test.go

    		t.Cleanup(func() { os.Setenv(env, prev) })
    
    		if err := os.Unsetenv(env); err != nil {
    			t.Errorf("couldn't unset env %s: %v", env, err)
    		}
    	}
    }
    
    func TestFallbackToEnv(t *testing.T) {
    	testCases := []struct {
    		desc          string
    		env           string
    		value         string
    		valueSet      bool
    		expectedValue string
    		expectedError bool
    	}{
    		{
    			desc:          "value unset",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 18 01:55:49 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. src/runtime/checkptr_test.go

    	exe, err := buildTestProg(t, "testprog", "-gcflags=all=-d=checkptr=2")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	testCases := []struct {
    		cmd  string
    		want string
    	}{
    		{"CheckPtrAlignmentNested", "fatal error: checkptr: converted pointer straddles multiple allocations\n"},
    	}
    
    	for _, tc := range testCases {
    		tc := tc
    		t.Run(tc.cmd, func(t *testing.T) {
    			t.Parallel()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 31 17:15:15 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/server/options/tracing_test.go

    var (
    	localhost    = "localhost:4317"
    	ipAddress    = "127.0.0.1:4317"
    	samplingRate = int32(12345)
    )
    
    func strptr(s string) *string {
    	return &s
    }
    
    func TestValidateTracingOptions(t *testing.T) {
    	testcases := []struct {
    		name        string
    		expectError bool
    		contents    *TracingOptions
    	}{
    		{
    			name:        "nil-valid",
    			expectError: false,
    		},
    		{
    			name:        "empty-valid",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 05 02:24:38 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  8. cmd/prune-junit-xml/prunexml.go

    	for _, suite := range suites.Suites {
    		for _, testcase := range suite.TestCases {
    			if testcase.SkipMessage != nil {
    				if len(testcase.SkipMessage.Message) > maxBytes {
    					fmt.Printf("clipping skip message in test case : %s\n", testcase.Name)
    					head := testcase.SkipMessage.Message[:maxBytes/2]
    					tail := testcase.SkipMessage.Message[len(testcase.SkipMessage.Message)-maxBytes/2:]
    					testcase.SkipMessage.Message = head + "[...clipped...]" + tail
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 06 12:26:00 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  9. pkg/registry/discovery/endpointslice/strategy_test.go

    				},
    			},
    		},
    	}
    
    	for _, testcase := range testcases {
    		t.Run(testcase.name, func(t *testing.T) {
    			featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.TopologyAwareHints, testcase.hintsGateEnabled)
    
    			dropDisabledFieldsOnUpdate(testcase.oldEPS, testcase.newEPS)
    			if !apiequality.Semantic.DeepEqual(testcase.newEPS, testcase.expectedEPS) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  10. internal/config/identity/openid/jwt_test.go

    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			claims := map[string]interface{}{}
    			claims["exp"] = testCase.exp
    			err := updateClaimsExpiry(testCase.dsecs, claims)
    			if err != nil && !testCase.expectedFailure {
    				t.Errorf("Expected success, got failure %s", err)
    			}
    			if err == nil && testCase.expectedFailure {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.3K bytes
    - Viewed (0)
Back to top