Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tls dispatcher tests all use different ports #8088

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions pkg/kncloudevents/event_dispatcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -999,19 +999,19 @@ 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,
}

// reply
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,
}

Expand Down Expand Up @@ -1059,19 +1059,19 @@ 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,
}

// dls
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,
}

Expand Down
Loading