Skip to content

Commit

Permalink
fix: tls dispatcher tests all use different ports (#8088)
Browse files Browse the repository at this point in the history
Signed-off-by: Calum Murray <cmurray@redhat.com>
  • Loading branch information
Cali0707 authored Jul 10, 2024
1 parent 9ea1d54 commit 57b52ea
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit 57b52ea

Please sign in to comment.