- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for ErrorContains (0.2 sec)
-
src/crypto/x509/sec1_test.go
var ecMismatchKeyTests = []struct { hexKey string errorContains string }{ {hexKey: hexECTestPKCS8Key, errorContains: "use ParsePKCS8PrivateKey instead"}, {hexKey: hexECTestPKCS1Key, errorContains: "use ParsePKCS1PrivateKey instead"}, } func TestECMismatchKeyFormat(t *testing.T) { for i, test := range ecMismatchKeyTests {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 27 19:34:12 UTC 2019 - 5.4K bytes - Viewed (0) -
src/crypto/x509/pkcs8_test.go
var pkcs8MismatchKeyTests = []struct { hexKey string errorContains string }{ {hexKey: hexPKCS8TestECKey, errorContains: "use ParseECPrivateKey instead"}, {hexKey: hexPKCS8TestPKCS1Key, errorContains: "use ParsePKCS1PrivateKey instead"}, } func TestPKCS8MismatchKeyFormat(t *testing.T) { for i, test := range pkcs8MismatchKeyTests {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Nov 19 16:45:10 UTC 2022 - 9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/policy/validating/admission_test.go
require.ErrorContains(t, err, "failed to configure binding: cannot use namespaced paramRef in policy binding that matches cluster-scoped resources") } else { require.NotEmpty(t, expectedParamsForClusterScopedRequest, "all test cases should match at least one param") require.ErrorContains(t, err, "Denied by policy") }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Mar 25 01:39:01 UTC 2024 - 63.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/validating/plugin_test.go
} // ErrWebhookRejected is not an error for our purposes if tt.ErrorContains != "" { if err == nil || !strings.Contains(err.Error(), tt.ErrorContains) { t.Errorf("%s: expected an error saying %q, but got %v", tt.Name, tt.ErrorContains, err) } } if _, isStatusErr := err.(*errors.StatusError); err != nil && !isStatusErr {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:52 UTC 2024 - 11.9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/testing/testcase.go
IsCRD bool IsDryRun bool AdditionalLabels map[string]string SkipBenchmark bool ExpectLabels map[string]string ExpectAllow bool ErrorContains string ExpectAnnotations map[string]string ExpectStatusCode int32 ExpectReinvokeWebhooks map[string]bool } // MutatingTest is a mutating webhook test case. type MutatingTest struct {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 03 06:51:04 UTC 2023 - 47.6K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/mutating/plugin_test.go
} } // ErrWebhookRejected is not an error for our purposes if tt.ErrorContains != "" { if err == nil || !strings.Contains(err.Error(), tt.ErrorContains) { t.Errorf("expected an error saying %q, but got: %v", tt.ErrorContains, err) } } if statusErr, isStatusErr := err.(*errors.StatusError); err != nil && !isStatusErr {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:52 UTC 2024 - 11K bytes - Viewed (0) -
pkg/test/framework/components/echo/check/checkers.go
return func(_ echo.CallResult, err error) error { if err == nil { return errors.New("expected error, but none occurred") } return nil } } // ErrorContains is similar to Error, but checks that the error message contains the given string. func ErrorContains(expected string) echo.Checker { return func(_ echo.CallResult, err error) error { if err == nil { return errors.New("expected error, but none occurred") }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Mar 03 16:19:07 UTC 2023 - 17.5K bytes - Viewed (0) -
cmd/kube-scheduler/app/options/configfile_test.go
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon Jan 22 13:43:42 UTC 2024 - 3.6K bytes - Viewed (0) -
tests/integration/security/ca_custom_root/trust_domain_validation_test.go
Cert: trustDomains[td].cert, Key: trustDomains[td].key, }, Check: check.OK(), } } if !allow { opt.Check = check.ErrorContains("tls: unknown certificate") } from.CallOrFail(t, opt) }) } // Request using plaintext should always allowed.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Apr 08 22:02:59 UTC 2024 - 5.9K bytes - Viewed (0) -
pkg/test/framework/components/authz/provider.go
switch opts.HTTP.Headers.Get(XExtAuthz) { case XExtAuthzAllow: return check.And(check.NoError(), checkHeaders) default: // Deny return check.And(check.Forbidden(protocol.GRPC), check.ErrorContains("desc = denied by ext_authz for not found header "+ "`x-ext-authz: allow` in the request")) } case opts.Port.Protocol.IsTCP(): if expectAllowed { return check.NoError() } // Deny
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Sat Apr 23 16:02:21 UTC 2022 - 5.9K bytes - Viewed (0)