Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. pilot/pkg/security/authz/matcher/header_test.go

    					PresentMatch: true,
    				},
    			},
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.Name, func(t *testing.T) {
    			actual := HeaderMatcher(tc.K, tc.V)
    			if !cmp.Equal(tc.Expect, actual, protocmp.Transform()) {
    				t.Errorf("expecting %v, but got %v", tc.Expect, actual)
    			}
    		})
    	}
    }
    
    func TestHostMatcherWithRegex(t *testing.T) {
    	testCases := []struct {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Aug 17 22:42:11 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  2. security/pkg/pki/util/verify_cert_test.go

    			expectedErr:    "",
    		},
    	}
    	for id, tc := range testCases {
    		err := VerifyCertificate(
    			tc.privPem, tc.certChainPem, tc.rootCertPem, tc.expectedFields)
    		if err != nil {
    			if len(tc.expectedErr) == 0 {
    				t.Errorf("%s: Unexpected error: %v", id, err)
    			} else if !strings.Contains(err.Error(), tc.expectedErr) {
    				t.Errorf("%s: Unexpected error: %v VS (expected) %s", id, err, tc.expectedErr)
    			}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 16 14:56:37 UTC 2022
    - 6.5K bytes
    - Viewed (0)
  3. test/fixedbugs/issue19658.go

    			log.Fatalf("expected a panic in output for %s, got: %s", tc.Type, out)
    		}
    		eolIdx := bytes.IndexByte(out[panicIdx:], '\n') + panicIdx
    		if panicIdx == -1 {
    			log.Fatalf("expected a newline in output for %s after the panic, got: %s", tc.Type, out)
    		}
    		out = out[0:eolIdx]
    		if string(out) != tc.Expect {
    			log.Fatalf("expected '%s' for panic(%s(%s)), got %s", tc.Expect, tc.Type, tc.Input, out)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:56:32 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  4. plugin/pkg/admission/network/denyserviceexternalips/admission_test.go

    			}
    
    			attrs := admission.NewAttributesRecord(
    				tc.newSvc, // new object
    				tc.oldSvc, // old object
    				core.Kind("Service").WithVersion("version"),
    				tc.newSvc.Namespace,
    				tc.newSvc.Name,
    				corev1.Resource("services").WithVersion("version"),
    				"", // subresource
    				op,
    				opt,
    				false, // dryRun
    				nil,   // userInfo
    			)
    
    			err := ctrl.Validate(context.TODO(), attrs, nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 14 05:36:44 UTC 2021
    - 3K bytes
    - Viewed (0)
  5. pkg/util/kernel/version_test.go

    			expected: nil,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			kernelVersion, err := getVersion(tc.readFileFunc)
    
    			if tc.err != nil {
    				assert.Equal(t, tc.err.Error(), err.Error())
    				assert.Nil(t, kernelVersion)
    			} else {
    				assert.NoError(t, err)
    				assert.Equal(t, tc.expected.Major(), kernelVersion.Major())
    				assert.Equal(t, tc.expected.Minor(), kernelVersion.Minor())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 27 19:24:34 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/endpoints/request/webhook_duration_test.go

    		}
    
    		if wd.ValidatingWebhookTracker.GetLatency() != tc.MaxDuration {
    			t.Errorf("expected validate duration: %q, but got: %q", tc.MaxDuration, wd.ValidatingWebhookTracker.GetLatency())
    		}
    
    		if wd.APFQueueWaitTracker.GetLatency() != tc.MaxDuration {
    			t.Errorf("expected priority & fairness duration: %q, but got: %q", tc.MaxDuration, wd.APFQueueWaitTracker.GetLatency())
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 14 09:15:20 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  7. pkg/apis/core/v1/validation/validation_test.go

    		skipLimitValueCheck: true,
    	}}
    	for _, tc := range errorCase {
    		t.Run(tc.name, func(t *testing.T) {
    			errs := ValidateResourceRequirements(&tc.requirements, field.NewPath("resources"))
    			if len(errs) == 0 {
    				t.Errorf("expected error")
    			}
    			validateNamesAndValuesInDescription(t, tc.requirements.Limits, errs, tc.skipLimitValueCheck, "limit")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  8. pkg/config/kube/conversion_test.go

    			expectedProto: protocol.HTTP2,
    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			actualProto := ConvertProtocol(tc.port, tc.portName, tc.proto, tc.appProto)
    			if actualProto != tc.expectedProto {
    				t.Errorf("ConvertProtocol(%d, %s, %s, %v) => %s, want %s",
    					tc.port, tc.portName, tc.proto, tc.appProto, actualProto, tc.expectedProto)
    			}
    		})
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 28 15:30:30 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  9. tools/istio-iptables/pkg/config/validation_test.go

    		},
    		{
    			name:    "capture all but 1000 groups",
    			exclude: NOwnerGroups(1000), // we don't have to put a limit on the number of groups to exclude
    		},
    	}
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			err := ValidateOwnerGroups(tc.include, tc.exclude)
    			assert.NoError(t, err)
    		})
    	}
    }
    
    func TestValidateOwnerGroups_Invalid(t *testing.T) {
    	cases := []struct {
    		name    string
    		include string
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jan 11 02:38:28 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. 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)
Back to top