Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 715 for tc (0.02 sec)

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

    			expectedValue: "10.244.0.6",
    		},
    	}
    	for _, tc := range testCases {
    		label, value, err := ConvertDownwardAPIFieldLabel(tc.version, tc.label, tc.value)
    		if err != nil {
    			if tc.expectedErr {
    				continue
    			}
    			t.Errorf("ConvertDownwardAPIFieldLabel(%s, %s, %s) failed: %s",
    				tc.version, tc.label, tc.value, err)
    		}
    		if tc.expectedLabel != label || tc.expectedValue != value {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jul 14 01:35:30 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags_test.go

    			}
    
    			p, err := printFlags.ToPrinter(tc.outputFormat)
    			if tc.expectNoMatch {
    				if !IsNoCompatiblePrinterError(err) {
    					t.Fatalf("expected no printer matches for output format %q", tc.outputFormat)
    				}
    				return
    			}
    			if IsNoCompatiblePrinterError(err) {
    				t.Fatalf("expected to match template printer for output format %q", tc.outputFormat)
    			}
    
    			if len(tc.expectedError) > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 09:47:52 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/patches/patches_test.go

    				patches:    []string{`{"foo":"bar"}`, `{"foo":"baz"}`},
    			},
    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			ps, _ := createPatchSet(tc.targetName, tc.patchType, tc.data)
    			if !reflect.DeepEqual(ps, tc.expectedPatchSet) {
    				t.Fatalf("expected patch set:\n%+v\ngot:\n%+v\n", tc.expectedPatchSet, ps)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 09 14:24:11 UTC 2023
    - 11.9K bytes
    - Viewed (0)
  4. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/template_flags_test.go

    			}
    
    			p, err := printFlags.ToPrinter(tc.outputFormat)
    			if tc.expectNoMatch {
    				if !IsNoCompatiblePrinterError(err) {
    					t.Fatalf("expected no printer matches for output format %q", tc.outputFormat)
    				}
    				return
    			}
    			if IsNoCompatiblePrinterError(err) {
    				t.Fatalf("expected to match template printer for output format %q", tc.outputFormat)
    			}
    
    			if len(tc.expectedError) > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 09:47:52 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/cli-runtime/pkg/resource/fallback_query_param_verifier_test.go

    	for tn, tc := range tests {
    		t.Run(tn, func(t *testing.T) {
    			fakeOpenAPIClient.ForcedErr = tc.primaryError
    			primary := createFakeV3Verifier(tc.crds, root, tc.queryParam)
    			secondary := createFakeLegacyVerifier(tc.crds, &fakeSchema, tc.queryParam)
    			verifier := NewFallbackQueryParamVerifier(primary, secondary)
    			err := verifier.HasSupport(tc.gvk)
    			if tc.expectedSupports && err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 18:30:16 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  6. src/regexp/all_test.go

    			t.Errorf("%q.ReplaceAllLiteralString(%q,%q) = %q; want %q",
    				tc.pattern, tc.input, tc.replacement, actual, tc.output)
    		}
    		// now try bytes
    		actual = string(re.ReplaceAllLiteral([]byte(tc.input), []byte(tc.replacement)))
    		if actual != tc.output {
    			t.Errorf("%q.ReplaceAllLiteral(%q,%q) = %q; want %q",
    				tc.pattern, tc.input, tc.replacement, actual, tc.output)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/strategy_test.go

    				},
    			},
    		},
    	}
    	for _, tc := range tcs {
    		if tc.statusEnabled {
    			strategy.status = &apiextensions.CustomResourceSubresourceStatus{}
    		} else {
    			strategy.status = nil
    		}
    		strategy.PrepareForUpdate(context.TODO(), tc.obj, tc.old)
    		if !reflect.DeepEqual(tc.obj, tc.expected) {
    			t.Errorf("test %q failed: expected: %v, got %v", tc.name, tc.expected, tc.obj)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  8. security/pkg/pki/util/keycertbundle_test.go

    		},
    	}
    	for id, tc := range testCases {
    		_, err := NewVerifiedKeyCertBundleFromFile(
    			tc.caCertFile, tc.caKeyFile, tc.certChainFile, tc.rootCertFile)
    		if err != nil {
    			if tc.expectedErr == "" {
    				t.Errorf("%s: Unexpected error: %v", id, err)
    			} else if !strings.HasPrefix(err.Error(), tc.expectedErr) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Jan 21 06:07:50 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  9. src/cmd/go/internal/fsys/fsys_test.go

    				t.Errorf("lstat(%q).Name(): got %q, want %q", tc.path, got.Name(), tc.want.name)
    			}
    			if got.Mode()&(fs.ModeDir|0700) != tc.want.mode {
    				t.Errorf("lstat(%q).Mode()&(fs.ModeDir|0700): got %v, want %v", tc.path, got.Mode()&(fs.ModeDir|0700), tc.want.mode)
    			}
    			if got.IsDir() != tc.want.isDir {
    				t.Errorf("lstat(%q).IsDir(): got %v, want %v", tc.path, got.IsDir(), tc.want.isDir)
    			}
    			if tc.want.isDir {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 18:52:11 UTC 2023
    - 29.1K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/helpers_test.go

    				}},
    			},
    			expectErr: true,
    		},
    	}
    
    	for i, tc := range tc {
    		inCopy := tc.in.DeepCopy()
    		out, err := LabelSelectorAsSelector(tc.in)
    		// after calling LabelSelectorAsSelector, tc.in shouldn't be modified
    		if !reflect.DeepEqual(inCopy, tc.in) {
    			t.Errorf("[%v]expected:\n\t%#v\nbut got:\n\t%#v", i, inCopy, tc.in)
    		}
    		if err == nil && tc.expectErr {
    			t.Errorf("[%v]expected error but got none.", i)
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 7.1K bytes
    - Viewed (0)
Back to top