From 450c48571aa47b58a69795169f04b809f94435ad Mon Sep 17 00:00:00 2001 From: Shawnh2 Date: Mon, 17 Apr 2023 22:28:43 +0800 Subject: [PATCH] fix unit test Signed-off-by: Shawnh2 --- internal/gatewayapi/address.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/gatewayapi/address.go b/internal/gatewayapi/address.go index 424e1da29d27..9386e86f1228 100644 --- a/internal/gatewayapi/address.go +++ b/internal/gatewayapi/address.go @@ -35,6 +35,8 @@ func (t *Translator) ProcessAddresses(gateways []*GatewayContext, xdsIR XdsIRMap } } - gwInfraIR.Proxy.Addresses = sets.List(ipAddr) + if ip := sets.List(ipAddr); len(ip) > 0 { + gwInfraIR.Proxy.Addresses = ip + } } }