Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dobrerazvan committed May 15, 2024
1 parent c34d10a commit 27d2abe
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions controllers/tests/kafkacluster_controller_contour_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ var _ = Describe("KafkaClusterWithContourIngressController", Label("contour"), f
contourListener.AnyCastPort = util.Int32Pointer(8443)
contourListener.Type = "plaintext"
contourListener.Name = "listener1"
contourListener.ServiceAnnotations = map[string]string{
"kubernetes.io/ingress.class": "contour",
}
contourListener.Config = &v1beta1.Config{

DefaultIngressConfig: "",
Expand Down Expand Up @@ -157,6 +160,9 @@ func expectContourAnycastHttpProxy(ctx context.Context, kafkaCluster *v1beta1.Ka
Expect(proxy.Spec.TCPProxy.Services).To(HaveLen(1))
Expect(proxy.Spec.TCPProxy.Services[0].Name).To(Equal(serviceName))
Expect(proxy.Spec.TCPProxy.Services[0].Port).To(Equal(int(*eListener.AnyCastPort)))
for k, v := range eListener.GetServiceAnnotations() {
Expect(proxy.GetAnnotations()).To(HaveKeyWithValue(k, v))
}
}

func expectContourBrokerHttpProxy(ctx context.Context, kafkaCluster *v1beta1.KafkaCluster, eListener v1beta1.ExternalListenerConfig) {
Expand All @@ -172,6 +178,9 @@ func expectContourBrokerHttpProxy(ctx context.Context, kafkaCluster *v1beta1.Kaf
Expect(proxy.Spec.TCPProxy.Services).To(HaveLen(1))
Expect(proxy.Spec.TCPProxy.Services[0].Name).To(Equal(serviceName))
Expect(proxy.Spec.TCPProxy.Services[0].Port).To(Equal(int(*eListener.AnyCastPort)))
for k, v := range eListener.GetServiceAnnotations() {
Expect(proxy.GetAnnotations()).To(HaveKeyWithValue(k, v))
}
}
}

Expand Down

0 comments on commit 27d2abe

Please sign in to comment.