Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 558 for tc (0.02 sec)

  1. src/net/dnsname_test.go

    	ch <- dnsNameTest{longDomain[len(longDomain)-254:], false}
    }
    
    func TestDNSName(t *testing.T) {
    	ch := make(chan dnsNameTest)
    	go emitDNSNameTest(ch)
    	for tc := range ch {
    		if isDomainName(tc.name) != tc.result {
    			t.Errorf("isDomainName(%q) = %v; want %v", tc.name, !tc.result, tc.result)
    		}
    	}
    }
    
    func BenchmarkDNSName(b *testing.B) {
    	testHookUninstaller.Do(uninstallTestHooks)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. pkg/apis/core/v1/helper/helpers_test.go

    		},
    		{
    			resourceName: "",
    			expectVal:    true,
    		},
    	}
    
    	for _, tc := range testCases {
    		tc := tc
    		t.Run(fmt.Sprintf("resourceName input=%s, expected value=%v", tc.resourceName, tc.expectVal), func(t *testing.T) {
    			t.Parallel()
    			v := IsNativeResource(tc.resourceName)
    			if v != tc.expectVal {
    				t.Errorf("Got %v but expected %v", v, tc.expectVal)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 30 23:03:54 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/apiclient/idempotency_test.go

    			expectedError: true,
    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			client := clientsetfake.NewSimpleClientset()
    			tc.setupClient(client)
    			err := CreateOrMutateConfigMap(client, &v1.ConfigMap{}, tc.mutator)
    			if (err != nil) != tc.expectedError {
    				t.Fatalf("expected error: %v, got %v, error: %v", tc.expectedError, err != nil, err)
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 11:14:32 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  4. pilot/pkg/security/authz/matcher/string_test.go

    				MatchPattern: &matcher.StringMatcher_Exact{
    					Exact: "abc-exact",
    				},
    			},
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			actual := StringMatcherWithPrefix(tc.v, tc.prefix)
    			if !cmp.Equal(actual, tc.want, protocmp.Transform()) {
    				t.Errorf("want %s but got %s", tc.want.String(), actual.String())
    			}
    		})
    	}
    }
    
    func TestStringMatcherRegex(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 17 22:42:11 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  5. pkg/controller/podautoscaler/replica_calculator_test.go

    	case objectPerPodMetric:
    		if tc.metric.singleObject == nil {
    			t.Fatal("Metric specified as objectMetric but metric.singleObject is nil.")
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Aug 19 03:31:34 UTC 2023
    - 68.4K bytes
    - Viewed (0)
  6. pkg/controller/nodeipam/ipam/range_allocator_test.go

    	}
    
    	// test function
    	tCtx := ktesting.Init(t)
    	for _, tc := range testCases {
    		t.Run(tc.description, func(t *testing.T) {
    			// Initialize the range allocator.
    			fakeNodeInformer := test.FakeNodeInformer(tc.fakeNodeHandler)
    			nodeList, _ := tc.fakeNodeHandler.List(tCtx, metav1.ListOptions{})
    			_, err := NewCIDRRangeAllocator(tCtx, tc.fakeNodeHandler, fakeNodeInformer, tc.allocatorParams, nodeList)
    			if err == nil && tc.ctrlCreateFail {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 10:06:15 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  7. pkg/registry/policy/poddisruptionbudget/strategy_test.go

    		},
    	}
    
    	for name, tc := range tests {
    		t.Run(name, func(t *testing.T) {
    			featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.PDBUnhealthyPodEvictionPolicy, tc.enableUnhealthyPodEvictionPolicy)
    
    			oldSpecBefore := tc.oldSpec.DeepCopy()
    			dropDisabledFields(tc.newSpec, tc.oldSpec)
    			if !reflect.DeepEqual(tc.newSpec, tc.expectNewSpec) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  8. pkg/proxy/conntrack/conntrack_test.go

    		},
    	}
    
    	for _, tc := range testCases {
    		ct := makeCT(success)
    		err := ct.ClearEntriesForPort(tc.port, tc.isIPv6, v1.ProtocolUDP)
    		if err != nil {
    			t.Errorf("%s/success: Unexpected error: %v", tc.name, err)
    		}
    		execCommand := ct.getExecutedCommand()
    		if tc.expectCommand != execCommand {
    			t.Errorf("%s/success: Expect command: %s, but executed %s", tc.name, tc.expectCommand, execCommand)
    		}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 15 18:08:36 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  9. istioctl/pkg/tag/tag_test.go

    			skipConfirmation: false,
    			error:            "",
    		},
    	}
    
    	for _, tc := range tcs {
    		t.Run(tc.name, func(t *testing.T) {
    			var out bytes.Buffer
    			client := fake.NewSimpleClientset(tc.webhooksBefore.DeepCopyObject(), tc.namespaces.DeepCopyObject())
    			err := removeTag(context.Background(), client, tc.tag, tc.skipConfirmation, &out)
    			if tc.error == "" && err != nil {
    				t.Fatalf("expected no error, got %v", err)
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Nov 17 22:41:06 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  10. pkg/webhooks/webhookpatch_test.go

    			watcher.SetAndNotify(nil, nil, tc.pemData)
    			whPatcher, err := NewWebhookCertPatcher(client, tc.revision, tc.webhookName, watcher)
    			if err != nil {
    				t.Fatal(err)
    			}
    
    			stop := test.NewStop(t)
    			client.RunAndWait(stop)
    			retry.UntilOrFail(t, whPatcher.webhooks.HasSynced)
    
    			err = whPatcher.patchMutatingWebhookConfig(tc.configName)
    			if (err != nil) != (tc.err != "") {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 02 09:53:38 UTC 2023
    - 8.6K bytes
    - Viewed (0)
Back to top