From 57b52eab350a4f46059ddb8ec005cffcfeea3181 Mon Sep 17 00:00:00 2001 From: Calum Murray Date: Wed, 10 Jul 2024 02:33:36 -0400 Subject: [PATCH] fix: tls dispatcher tests all use different ports (#8088) Signed-off-by: Calum Murray --- pkg/kncloudevents/event_dispatcher_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/kncloudevents/event_dispatcher_test.go b/pkg/kncloudevents/event_dispatcher_test.go index 29b6cd2f2d9..61efde1c2ad 100644 --- a/pkg/kncloudevents/event_dispatcher_test.go +++ b/pkg/kncloudevents/event_dispatcher_test.go @@ -999,9 +999,9 @@ func TestDispatchMessageToTLSEndpointWithReply(t *testing.T) { w.Write(eventToReply.Data()) }) - destinationCA := eventingtlstesting.StartServer(ctxDestination, t, 8334, destinationHandler, kncloudevents.WithDrainQuietPeriod(time.Millisecond)) + destinationCA := eventingtlstesting.StartServer(ctxDestination, t, 8335, destinationHandler, kncloudevents.WithDrainQuietPeriod(time.Millisecond)) destination := duckv1.Addressable{ - URL: apis.HTTPS("localhost:8334"), + URL: apis.HTTPS("localhost:8335"), CACerts: &destinationCA, } @@ -1009,9 +1009,9 @@ func TestDispatchMessageToTLSEndpointWithReply(t *testing.T) { replyEventChan := make(chan cloudevents.Event, 10) replyHandler := eventingtlstesting.EventChannelHandler(replyEventChan) replyReceivedEvents := make([]cloudevents.Event, 0, 10) - replyCA := eventingtlstesting.StartServer(ctxReply, t, 8335, replyHandler, kncloudevents.WithDrainQuietPeriod(time.Millisecond)) + replyCA := eventingtlstesting.StartServer(ctxReply, t, 8336, replyHandler, kncloudevents.WithDrainQuietPeriod(time.Millisecond)) reply := duckv1.Addressable{ - URL: apis.HTTPS("localhost:8335"), + URL: apis.HTTPS("localhost:8336"), CACerts: &replyCA, } @@ -1059,9 +1059,9 @@ func TestDispatchMessageToTLSEndpointWithDeadLetterSink(t *testing.T) { w.WriteHeader(http.StatusInternalServerError) }) - destinationCA := eventingtlstesting.StartServer(ctxDestination, t, 8334, destinationHandler, kncloudevents.WithDrainQuietPeriod(time.Millisecond)) + destinationCA := eventingtlstesting.StartServer(ctxDestination, t, 8337, destinationHandler, kncloudevents.WithDrainQuietPeriod(time.Millisecond)) destination := duckv1.Addressable{ - URL: apis.HTTPS("localhost:8334"), + URL: apis.HTTPS("localhost:8337"), CACerts: &destinationCA, } @@ -1069,9 +1069,9 @@ func TestDispatchMessageToTLSEndpointWithDeadLetterSink(t *testing.T) { dlsEventChan := make(chan cloudevents.Event, 10) dlsHandler := eventingtlstesting.EventChannelHandler(dlsEventChan) dlsReceivedEvents := make([]cloudevents.Event, 0, 10) - dlsCA := eventingtlstesting.StartServer(ctxDls, t, 8335, dlsHandler, kncloudevents.WithDrainQuietPeriod(time.Millisecond)) + dlsCA := eventingtlstesting.StartServer(ctxDls, t, 8338, dlsHandler, kncloudevents.WithDrainQuietPeriod(time.Millisecond)) dls := duckv1.Addressable{ - URL: apis.HTTPS("localhost:8335"), + URL: apis.HTTPS("localhost:8338"), CACerts: &dlsCA, }