From 2ea7af899478b52d04b0c4aafea4764c9073b698 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Wed, 2 Aug 2023 02:39:03 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/reconciler-test 26cee79...1923290: > 1923290 Support HTTPS in StartSenderToResource (# 560) > 5741fb8 Allow passing namespace for MatchPeerCertificatesFromSecret (# 558) Signed-off-by: Knative Automation --- go.mod | 2 +- go.sum | 4 ++-- .../reconciler-test/pkg/eventshub/assert/step.go | 7 +++---- .../knative.dev/reconciler-test/pkg/eventshub/options.go | 5 +++++ vendor/modules.txt | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 2552699466..6b45f93ac8 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( knative.dev/eventing v0.38.0 knative.dev/hack v0.0.0-20230712131415-ddae80293c43 knative.dev/pkg v0.0.0-20230718152110-aef227e72ead - knative.dev/reconciler-test v0.0.0-20230726074640-26cee79ad63d + knative.dev/reconciler-test v0.0.0-20230731164843-19232908376e sigs.k8s.io/controller-runtime v0.12.3 ) diff --git a/go.sum b/go.sum index 2a5e6360fc..dd8adab5dd 100644 --- a/go.sum +++ b/go.sum @@ -1345,8 +1345,8 @@ knative.dev/hack v0.0.0-20230712131415-ddae80293c43 h1:3SE06uNfSFGm/5XS+0trbyCUp knative.dev/hack v0.0.0-20230712131415-ddae80293c43/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q= knative.dev/pkg v0.0.0-20230718152110-aef227e72ead h1:2dDzorpKuVZW3Qp7TbirMMq16FbId8f6bacQFX8jXLw= knative.dev/pkg v0.0.0-20230718152110-aef227e72ead/go.mod h1:WmrwRV/P+hGHoMraAEfwg6ec+fBTf+Obu41v354Iabc= -knative.dev/reconciler-test v0.0.0-20230726074640-26cee79ad63d h1:B7s1+wFSkQF3oJFjMK3WGPiKvBYMatjgxqei0CX0BoA= -knative.dev/reconciler-test v0.0.0-20230726074640-26cee79ad63d/go.mod h1:i+/PWK/n3HPgjXMoj5U7CA6WRW/C3c3EfHCQ0FmrhNM= +knative.dev/reconciler-test v0.0.0-20230731164843-19232908376e h1:kiW6vipbqTNIXicsOoUQBRH9/dYIbiTZv332Rk+YmvI= +knative.dev/reconciler-test v0.0.0-20230731164843-19232908376e/go.mod h1:i+/PWK/n3HPgjXMoj5U7CA6WRW/C3c3EfHCQ0FmrhNM= pgregory.net/rapid v0.3.3 h1:jCjBsY4ln4Atz78QoBWxUEvAHaFyNDQg9+WU62aCn1U= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/vendor/knative.dev/reconciler-test/pkg/eventshub/assert/step.go b/vendor/knative.dev/reconciler-test/pkg/eventshub/assert/step.go index 390a4575c5..e4a2436aac 100644 --- a/vendor/knative.dev/reconciler-test/pkg/eventshub/assert/step.go +++ b/vendor/knative.dev/reconciler-test/pkg/eventshub/assert/step.go @@ -9,7 +9,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kubeclient "knative.dev/pkg/client/injection/kube/client" - "knative.dev/reconciler-test/pkg/environment" "knative.dev/reconciler-test/pkg/eventshub" "knative.dev/reconciler-test/pkg/feature" ) @@ -126,10 +125,10 @@ func toFixedContextMatchers(ctx context.Context, matchers []eventshub.EventInfoM return out } -func MatchPeerCertificatesFromSecret(name string, key string) eventshub.EventInfoMatcherCtx { +func MatchPeerCertificatesFromSecret(namespace, name string, key string) eventshub.EventInfoMatcherCtx { return func(ctx context.Context, info eventshub.EventInfo) error { secret, err := kubeclient.Get(ctx).CoreV1(). - Secrets(environment.FromContext(ctx).Namespace()). + Secrets(namespace). Get(ctx, name, metav1.GetOptions{}) if err != nil { @@ -141,7 +140,7 @@ func MatchPeerCertificatesFromSecret(name string, key string) eventshub.EventInf return fmt.Errorf("failed to get value from secret %s/%s for key %s", secret.Namespace, secret.Name, key) } - if info.Connection == nil && info.Connection.TLS == nil { + if info.Connection == nil || info.Connection.TLS == nil { return fmt.Errorf("failed to match peer certificates, connection is not TLS") } diff --git a/vendor/knative.dev/reconciler-test/pkg/eventshub/options.go b/vendor/knative.dev/reconciler-test/pkg/eventshub/options.go index 44d82b789c..6448bde960 100644 --- a/vendor/knative.dev/reconciler-test/pkg/eventshub/options.go +++ b/vendor/knative.dev/reconciler-test/pkg/eventshub/options.go @@ -88,6 +88,11 @@ func StartSenderToResource(gvr schema.GroupVersionResource, name string) EventsH if u == nil { return fmt.Errorf("resource %v named %s is not addressable", gvr, name) } + + if u.URL.Scheme == "https" { + return StartSenderURLTLS(u.URL.String(), u.CACerts)(ctx, envs) + } + return StartSenderURL(u.URL.String())(ctx, envs) } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 50089c2140..ae93d466c7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1541,7 +1541,7 @@ knative.dev/pkg/webhook/json knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/reconciler-test v0.0.0-20230726074640-26cee79ad63d +# knative.dev/reconciler-test v0.0.0-20230731164843-19232908376e ## explicit; go 1.18 knative.dev/reconciler-test/cmd/eventshub knative.dev/reconciler-test/pkg/environment