Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
adressing comments p4
Browse files Browse the repository at this point in the history
  • Loading branch information
maksymvavilov committed Sep 18, 2023
1 parent 0d65de0 commit 2ebe774
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/dnspolicy/dnspolicy_dnsrecords.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func listenerTotalAttachedRoutes(upstreamGateway *gatewayv1beta1.Gateway, downst
if !found {
return 0
}
if clusterName == downstreamCluster && (listenerName == string(specListener.Name) || strings.Contains(string(*specListener.Hostname), "*")) {
if clusterName == downstreamCluster && listenerName == string(specListener.Name) {
return int(statusListener.AttachedRoutes)
}
}
Expand Down
9 changes: 8 additions & 1 deletion test/integration/dnspolicy_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,14 @@ var _ = Describe("DNSPolicy", Ordered, func() {
return err
}
gateway.Status.Addresses = testBuildGatewayAddresses()
gateway.Status.Listeners = testBuildGatewayListenerStatus([]string{TestPlacedClusterControlName + "." + TestAttachedRouteName, TestPlaceClusterWorkloadName + "." + TestAttachedRouteName}, []int32{1, 1})
gateway.Status.Listeners = testBuildGatewayListenerStatus(
[]string{
TestPlacedClusterControlName + "." + TestAttachedRouteName,
TestPlaceClusterWorkloadName + "." + TestAttachedRouteName,
TestPlacedClusterControlName + "." + TestWildCardListenerName,
TestPlaceClusterWorkloadName + "." + TestWildCardListenerName,
},
[]int32{1, 1, 1, 1})
return k8sClient.Status().Update(ctx, gateway)
}, TestTimeoutMedium, TestRetryIntervalMedium).ShouldNot(HaveOccurred()) // end of the workaround
})
Expand Down

0 comments on commit 2ebe774

Please sign in to comment.