- Sort Score
- Result 10 results
- Languages All
Results 141 - 150 of 1,123 for testCases (0.88 sec)
-
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) -
staging/src/k8s.io/apimachinery/pkg/labels/selector_test.go
} for _, testcase := range testcases { p := &Parser{l: &Lexer{s: testcase.token, pos: 0}, position: 0} p.scan() _, err := p.parseOperator() if ok := reflect.DeepEqual(testcase.expectedError, err); !ok { t.Errorf("\nexpect err [%v], \nactual err [%v]", testcase.expectedError, err) } } } func TestRequirementConstructor(t *testing.T) {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Nov 14 16:39:04 UTC 2022 - 29.9K 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/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/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/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) -
internal/hash/reader_test.go
success: false, }, } for i, testCase := range testCases { t.Run(fmt.Sprintf("case-%d", i+1), func(t *testing.T) { _, err := NewReader(context.Background(), testCase.src, testCase.size, testCase.md5hex, testCase.sha256hex, testCase.actualSize) if err != nil && testCase.success { t.Errorf("Test %q: Expected success, but got error %s instead", testCase.desc, err) } if err == nil && !testCase.success {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 18 17:00:54 UTC 2023 - 10.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)