- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 1,126 for testCases (0.15 sec)
-
staging/src/k8s.io/apiserver/pkg/endpoints/filters/authorization_test.go
auditinternal "k8s.io/apiserver/pkg/apis/audit" "k8s.io/apiserver/pkg/audit" "k8s.io/apiserver/pkg/authorization/authorizer" ) func TestGetAuthorizerAttributes(t *testing.T) { testcases := map[string]struct { Verb string Path string ExpectedAttributes *authorizer.AttributesRecord }{ "non-resource root": { Verb: "POST", Path: "/",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jul 03 16:16:51 UTC 2023 - 5K bytes - Viewed (0) -
pkg/volume/csi/csi_client_test.go
capabilityMethodToTest func(*csiDriverClient) (bool, error), nodeClientGenerator func(bool) *fake.NodeClient) { testCases := []struct { name string capable bool }{ {name: "positive", capable: true}, {name: "negative", capable: false}, } for _, tc := range testCases { t.Logf("Running test case: %s", tc.name) fakeCloser := fake.NewCloser(t) client := &csiDriverClient{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 33.9K bytes - Viewed (0) -
pkg/kubelet/apis/config/validation/validation_reserved_memory_test.go
}, } for _, testCase := range testCases { errors := validateReservedMemoryConfiguration(testCase.kubeletConfiguration) if len(errors) != 0 && testCase.expectedError == nil { t.Errorf("expected errors %v, got %v", errors, testCase.expectedError) } if testCase.expectedError != nil { if len(errors) == 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Nov 18 13:38:01 UTC 2021 - 3.7K bytes - Viewed (0) -
internal/http/check_port_test.go
port := l.Addr().(*net.TCPAddr).Port testCases := []struct { host string port int expectedErr error }{ {"", port, fmt.Errorf("listen tcp :%v: bind: address already in use", port)}, {"127.0.0.1", port, fmt.Errorf("listen tcp 127.0.0.1:%v: bind: address already in use", port)}, } for _, testCase := range testCases { err := CheckPortAvailability(testCase.host, strconv.Itoa(testCase.port), TCPOptions{})
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 03 21:12:25 UTC 2023 - 1.9K bytes - Viewed (0) -
pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go
return InstanceAllocation{ Allocated: allocated, Instance: &resourceapi.NamedResourcesInstance{ Name: name, Attributes: attributes, }, } } func TestModel(t *testing.T) { testcases := map[string]struct { resources []*resourceapi.NamedResourcesResources allocations []*resourceapi.NamedResourcesAllocationResult expectModel Model }{ "empty": {}, "nil": {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Mar 27 09:27:01 UTC 2024 - 7.9K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/template_flags_test.go
t.Fatalf("unexpected error: %v", err) } defer func(tempFile *os.File) { tempFile.Close() os.Remove(tempFile.Name()) }(templateFile) fmt.Fprintf(templateFile, "{{ .metadata.name }}") testCases := []struct { name string outputFormat string templateArg string expectedError string expectedParseError string expectedOutput string expectNoMatch bool }{
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Jun 02 09:47:52 UTC 2023 - 5.9K bytes - Viewed (0) -
pkg/util/flag/flags_test.go
) func TestIPVar(t *testing.T) { defaultIP := "0.0.0.0" testCases := []struct { argc string expectErr bool expectVal string }{ { argc: "blah --ip=1.2.3.4", expectVal: "1.2.3.4", }, { argc: "blah --ip=1.2.3.4a", expectErr: true, expectVal: defaultIP, }, } for _, tc := range testCases { fs := pflag.NewFlagSet("blah", pflag.PanicOnError)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Dec 14 10:45:23 UTC 2021 - 8.8K bytes - Viewed (0) -
cmd/signature-v4-utils_test.go
if testCase.inputHeaderKey != "" { q.Add(testCase.inputHeaderKey, testCase.inputHeaderValue) } inputReq.URL.RawQuery = q.Encode() } else if testCase.inputHeaderKey != "" { inputReq.Header.Set(testCase.inputHeaderKey, testCase.inputHeaderValue) } inputReq.ParseForm() actualResult := skipContentSha256Cksum(inputReq) if testCase.expectedResult != actualResult {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Apr 05 21:26:41 UTC 2024 - 14.3K bytes - Viewed (0) -
pkg/registry/core/pod/rest/log_test.go
Storage: genericregistry.DryRunnableStorage{Storage: s}, } logRest := &LogREST{Store: store, KubeletConn: nil} negativeOne := int64(-1) testCases := []*api.PodLogOptions{ {SinceSeconds: &negativeOne}, {TailLines: &negativeOne}, } for _, tc := range testCases { _, err := logRest.Get(genericapirequest.NewDefaultContext(), "test", tc) if !errors.IsInvalid(err) { t.Fatalf("Unexpected error: %v", err) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 24 09:23:05 UTC 2023 - 1.6K bytes - Viewed (0) -
pkg/quota/v1/evaluator/core/services_test.go
}, }, } for testName, testCase := range testCases { t.Run(testName, func(t *testing.T) { actual, err := evaluator.Usage(testCase.service) if err != nil { t.Errorf("%s unexpected error: %v", testName, err) } if !quota.Equals(testCase.usage, actual) { t.Errorf("%s expected: %v, actual: %v", testName, testCase.usage, actual) } }) } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Dec 16 15:48:58 UTC 2021 - 9.4K bytes - Viewed (0)