Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 764 for tc (0.15 sec)

  1. cmd/kubeadm/app/cmd/token_test.go

    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			token := outputapiv1alpha3.BootstrapToken{
    				BootstrapToken: bootstraptokenv1.BootstrapToken{
    					Token:       &bootstraptokenv1.BootstrapTokenString{ID: tc.id, Secret: tc.secret},
    					Description: tc.description,
    					Usages:      tc.usages,
    					Groups:      tc.extraGroups,
    				},
    			}
    			buf := bytes.Buffer{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 05:47:48 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  2. internal/bucket/lifecycle/transition_test.go

    			input: `<Transition>
    			<Days>1</Days>
    		  </Transition>`,
    			err: errXMLNotWellFormed,
    		},
    	}
    
    	for i, tc := range trTests {
    		var tr Transition
    		err := xml.Unmarshal([]byte(tc.input), &tr)
    		if err != nil {
    			t.Fatalf("%d: xml unmarshal failed with %v", i+1, err)
    		}
    		if err = tr.Validate(); err != tc.err {
    			t.Fatalf("%d: Invalid transition %v: err %v", i+1, tr, err)
    		}
    	}
    
    	ntrTests := []struct {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Oct 01 18:58:17 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  3. src/crypto/x509/cert_pool_test.go

    		{
    			name:  "one nil pool, one empty pool",
    			a:     nil,
    			b:     emptyPool,
    			equal: false,
    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			equal := tc.a.Equal(tc.b)
    			if equal != tc.equal {
    				t.Errorf("Unexpected Equal result: got %t, want %t", equal, tc.equal)
    			}
    		})
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 13 18:06:43 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  4. pkg/kubelet/volumemanager/reconciler/reconstruct_test.go

    			if !reflect.DeepEqual(sets.List(volumesFailedReconstruction), tc.expectedVolumesFailedReconstruction) {
    				t.Errorf("Expected volumesFailedReconstruction:\n%v\n got:\n%v", tc.expectedVolumesFailedReconstruction, sets.List(volumesFailedReconstruction))
    			}
    
    			if tc.verifyFunc != nil {
    				if err := tc.verifyFunc(rcInstance, fakePlugin); err != nil {
    					t.Errorf("Test %s failed: %v", tc.name, err)
    				}
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  5. pkg/kubelet/network/dns/dns_test.go

    		},
    	}
    
    	for _, tc := range testCases {
    		options := mergeDNSOptions(tc.existingDNSConfigOptions, tc.dnsConfigOptions)
    		// Options order may be changed after conversion.
    		if !sets.New[string](options...).Equal(sets.New[string](tc.expectedOptions...)) {
    			t.Errorf("%s: mergeDNSOptions(%v, %v)=%v, want %v", tc.desc, tc.existingDNSConfigOptions, tc.dnsConfigOptions, options, tc.expectedOptions)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  6. pkg/kubelet/userns/userns_manager_test.go

    	assert.NoError(t, err)
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			// We don't validate the result. It was parsed with the json parser, we trust that.
    			_, err = m.parseUserNsFileAndRecord(types.UID(tc.name), []byte(tc.file))
    			if (tc.success && err == nil) || (!tc.success && err != nil) {
    				return
    			}
    
    			t.Errorf("expected success: %v but got error: %v", tc.success, err)
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  7. pkg/volume/util/hostutil/hostutil_test.go

    			expectedPath: "lish",
    		},
    	}
    
    	for name, tc := range testCases {
    		t.Run(name, func(t *testing.T) {
    			mounter := &fakeMounter{
    				mountRefs:  tc.mountRefs,
    				raiseError: tc.raiseError,
    			}
    
    			path, err := hu.GetDeviceNameFromMount(mounter, path, path)
    			if tc.expectedError != "" {
    				if err == nil || err.Error() != tc.expectedError {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jun 01 16:02:07 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  8. src/internal/profile/proto_test.go

    		},
    	} {
    		source := &packedInts{tc.uint64s, tc.int64s}
    		if got, want := marshal(source), tc.encoded; !reflect.DeepEqual(got, want) {
    			t.Errorf("failed encode %d, got %v, want %v", i, got, want)
    		}
    
    		dest := new(packedInts)
    		if err := unmarshal(tc.encoded, dest); err != nil {
    			t.Errorf("failed decode %d: %v", i, err)
    			continue
    		}
    		if got, want := dest.uint64s, tc.uint64s; !reflect.DeepEqual(got, want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 09 14:05:53 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  9. pkg/volume/csi/csi_plugin_test.go

    			shouldFail: true,
    		},
    	}
    
    	for _, tc := range testCases {
    		// Arrange & Act
    		err := PluginHandler.ValidatePlugin(tc.pluginName, tc.endpoint, tc.versions)
    
    		// Assert
    		if tc.shouldFail && err == nil {
    			t.Fatalf("expecting ValidatePlugin to fail, but got nil error for testcase: %#v", tc)
    		}
    		if !tc.shouldFail && err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  10. 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)
Back to top