- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 101 for expectError (0.15 sec)
-
pkg/config/schema/resource/schema_test.go
func TestValidate(t *testing.T) { cases := []struct { name string b Builder expectError bool }{ { name: "valid", b: Builder{ Kind: "Empty", Plural: "Empties", ProtoPackage: "github.com/gogo/protobuf/types", Proto: "google.protobuf.Empty", }, expectError: false, }, { name: "invalid kind", b: Builder{ Kind: "",
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue Oct 31 14:48:28 UTC 2023 - 5.2K bytes - Viewed (0) -
pkg/registry/core/service/storage/storage_test.go
if tc.create.expectError && err != nil { return } if err != nil { t.Fatalf("unexpected error creating service: %v", err) } defer storage.Delete(ctx, tc.create.svc.Name, rest.ValidateAllObjectFunc, &metav1.DeleteOptions{}) // in case if tc.create.expectError && err == nil { t.Fatalf("unexpected success creating service") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 440.2K bytes - Viewed (0) -
pkg/kubelet/util/util_test.go
hostDomain string setHostnameAsFQDN bool expectedHostname string expectError bool }{{ description: "no hostDomain, setHostnameAsFQDN false", hostname: "test.pod.hostname", hostDomain: "", setHostnameAsFQDN: false, expectedHostname: "test.pod.hostname", expectError: false, }, { description: "no hostDomain, setHostnameAsFQDN true",
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 25 14:16:02 UTC 2023 - 5.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/options/authentication_test.go
err := tc.options.ApplyTo(c, servingInfo, openAPIConfig) if (err != nil) != tc.expectError { t.Errorf("expected error=%v, got %v", tc.expectError, err) } if (c.Authenticator != nil) != tc.expectAuthenticator { t.Errorf("expected authenticator=%v, got %#v", tc.expectError, c.Authenticator) } if c.Authenticator != nil { {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 23 15:01:56 UTC 2019 - 6.9K bytes - Viewed (0) -
pkg/apis/node/validation/validation_test.go
tests := []struct { name string rc node.RuntimeClass expectError bool }{{ name: "invalid name", expectError: true, rc: node.RuntimeClass{ ObjectMeta: metav1.ObjectMeta{Name: "&!@#"}, Handler: "foo", }, }, { name: "invalid Handler name", expectError: true, rc: node.RuntimeClass{ ObjectMeta: metav1.ObjectMeta{Name: "foo"},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue May 02 07:48:42 UTC 2023 - 6.4K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/util/proxy/dial_test.go
} if err != nil { if tc.ExpectError == "" { t.Errorf("%s: expected no error, got %q", k, err.Error()) } if tc.ExpectError != "" && !regexp.MustCompile(tc.ExpectError).MatchString(err.Error()) { t.Errorf("%s: expected error containing %q, got %q", k, tc.ExpectError, err.Error()) } return } tlsConn := conn.(*tls.Conn)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Oct 23 22:33:38 UTC 2023 - 8.4K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/webhook/serviceresolver_test.go
if err != nil && !scenario.expectError { t.Errorf("unexpected error has occurred = %v", err) } if err == nil && scenario.expectError { t.Error("expected an error but got nothing") } if !scenario.expectError { if serviceURL.String() != scenario.expectedOutput { t.Errorf("expected = %s, got = %s", scenario.expectedOutput, serviceURL.String()) } } }) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Apr 08 07:19:52 UTC 2019 - 2K bytes - Viewed (0) -
pkg/volume/util/subpath/subpath_windows_test.go
tests := []struct { volumePath string subPath string expectError bool symlinkTarget string }{ { volumePath: testingVolumePath, subPath: ``, expectError: true, symlinkTarget: "", }, { volumePath: testingVolumePath, subPath: filepath.Join(testingVolumePath, `x`), expectError: false, symlinkTarget: "", }, {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Aug 24 19:47:49 UTC 2021 - 13.8K bytes - Viewed (0) -
plugin/pkg/admission/runtimeclass/admission_test.go
tests := []struct { name string expectError bool runtimeClass *RuntimeClass }{ { name: "runtimeClass enabled, success", expectError: false, runtimeClass: newRuntimeClassForTest(true, nil, true, nil), }, { name: "runtimeClass enabled, no lister", expectError: true, runtimeClass: newRuntimeClassForTest(false, nil, true, nil), },
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Mar 17 01:30:14 UTC 2022 - 17.5K bytes - Viewed (0) -
pkg/volume/util/subpath/subpath_linux_test.go
test.prepare(base) pathToCreate := filepath.Join(base, test.path) err = doSafeMakeDir(pathToCreate, base, test.perm) if err != nil && !test.expectError { t.Fatal(err) } if err != nil { t.Logf("got error: %s", err) } if err == nil && test.expectError { t.Fatalf("expected error, got none") } if test.checkPath != "" { st, err := os.Stat(filepath.Join(base, test.checkPath))
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Nov 10 16:52:55 UTC 2021 - 37.3K bytes - Viewed (0)