From 89baddca259d38dd37e1e9aa3e58170d5067da66 Mon Sep 17 00:00:00 2001 From: Andrew Stucki Date: Tue, 21 Feb 2023 13:17:46 -0500 Subject: [PATCH] Update docstrings and test --- agent/structs/config_entry_gateways.go | 5 ++--- api/config_entry_gateways.go | 5 ++--- .../connect/envoy/case-api-gateway-tcp-conflicted/setup.sh | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/agent/structs/config_entry_gateways.go b/agent/structs/config_entry_gateways.go index a18ac42bb1026..885a301fc4676 100644 --- a/agent/structs/config_entry_gateways.go +++ b/agent/structs/config_entry_gateways.go @@ -867,9 +867,8 @@ const ( // APIGatewayListener represents an individual listener for an APIGateway type APIGatewayListener struct { - // Name is the optional name of the listener in a given gateway. This is - // optional but must be unique within a gateway; therefore, if a gateway - // has more than a single listener, all but one must specify a Name. + // Name is the name of the listener in a given gateway. This must be + // unique within a gateway. Name string // Hostname is the host name that a listener should be bound to. If // unspecified, the listener accepts requests for all hostnames. diff --git a/api/config_entry_gateways.go b/api/config_entry_gateways.go index 209c7ae0df984..05e43832c1fdb 100644 --- a/api/config_entry_gateways.go +++ b/api/config_entry_gateways.go @@ -268,9 +268,8 @@ func (g *APIGatewayConfigEntry) GetModifyIndex() uint64 { return g.ModifyInd // APIGatewayListener represents an individual listener for an APIGateway type APIGatewayListener struct { - // Name is the optional name of the listener in a given gateway. This is - // optional, however, it must be unique. Therefore, if a gateway has more - // than a single listener, all but one must specify a Name. + // Name is the name of the listener in a given gateway. This must be + // unique within a gateway. Name string // Hostname is the host name that a listener should be bound to, if // unspecified, the listener accepts requests for all hostnames. diff --git a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/setup.sh b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/setup.sh index bb9baacbb0f91..76b656ac0d497 100644 --- a/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/setup.sh +++ b/test/integration/connect/envoy/case-api-gateway-tcp-conflicted/setup.sh @@ -9,6 +9,7 @@ listeners = [ { port = 9999 protocol = "tcp" + name = "listener" } ] '