Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 281 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. 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)
  3. 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)
  4. src/cmd/go/internal/modload/mvs_test.go

    		{a: "v0.1.0", b: "none", want: "v0.1.0"},
    		{a: "none", b: "", want: ""},
    		{a: "", b: "none", want: ""},
    	} {
    		max := reqs.Max("", tc.a, tc.b)
    		if max != tc.want {
    			t.Errorf("(%T).Max(%q, %q) = %q; want %q", reqs, tc.a, tc.b, max, tc.want)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 19:01:26 UTC 2023
    - 818 bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. staging/src/k8s.io/apimachinery/pkg/util/json/json_test.go

    				t.Fatalf("%s: error decoding: %v", tc.In, err)
    			}
    			if tc.Err {
    				t.Fatalf("%s: expected error, got none", tc.In)
    			}
    			data, ok := m["data"]
    			if !ok {
    				t.Fatalf("%s: decoded object missing data key: %#v", tc.In, m)
    			}
    			if !reflect.DeepEqual(tc.Data, data) {
    				t.Fatalf("%s: expected\n\t%#v (%v), got\n\t%#v (%v)", tc.In, tc.Data, reflect.TypeOf(tc.Data), data, reflect.TypeOf(data))
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 28 08:02:09 UTC 2022
    - 9.3K bytes
    - Viewed (0)
  8. pkg/controller/podautoscaler/metrics/utilization_test.go

    	expectedRawAverageValue    int64
    	expectedErr                error
    }
    
    func (tc *resourceUtilizationRatioTestCase) runTest(t *testing.T) {
    	actualUtilizationRatio, actualCurrentUtilization, actualRawAverageValue, actualErr := GetResourceUtilizationRatio(tc.metrics, tc.requests, tc.targetUtilization)
    
    	if tc.expectedErr != nil {
    		assert.Error(t, actualErr, "there should be an error getting the utilization ratio")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Sep 22 08:59:02 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  9. security/pkg/pki/util/san_test.go

    		},
    	}
    
    	for id, tc := range testCases {
    		actualIDs, err := ExtractIDs(tc.exts)
    		if !reflect.DeepEqual(actualIDs, tc.expectedIDs) {
    			t.Errorf("Case %q: unexpected identities: want %v but got %v", id, tc.expectedIDs, actualIDs)
    		}
    		if tc.expectedErrMsg != "" {
    			if err == nil {
    				t.Errorf("Case %q: no error message returned: want %s", id, tc.expectedErrMsg)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Feb 12 17:36:33 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/api/meta/errors_test.go

    			matcherFunc: IsNoMatchError,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			if !errors.Is(tc.input, tc.new()) {
    				t.Error("error doesn't match itself directly")
    			}
    			if !errors.Is(fmt.Errorf("wrapepd: %w", tc.input), tc.new()) {
    				t.Error("error doesn't match itself when wrapped")
    			}
    			if !tc.matcherFunc(tc.input) {
    				t.Errorf("error doesn't get matched by matcherfunc")
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 11 22:50:51 UTC 2022
    - 2.4K bytes
    - Viewed (0)
Back to top