From e1808af729124444cc0e633edf3ddbb1d8401c17 Mon Sep 17 00:00:00 2001 From: freddygv Date: Tue, 13 Apr 2021 16:08:41 -0600 Subject: [PATCH] Fixup tests --- agent/agent_endpoint_test.go | 4 ++++ agent/structs/connect_proxy_config_test.go | 8 ++++++++ command/services/config_test.go | 8 ++++++++ 3 files changed, 20 insertions(+) diff --git a/agent/agent_endpoint_test.go b/agent/agent_endpoint_test.go index 1347055fd2..5aba74bf16 100644 --- a/agent/agent_endpoint_test.go +++ b/agent/agent_endpoint_test.go @@ -3519,6 +3519,10 @@ func testAgent_RegisterService_UnmanagedConnectProxy(t *testing.T, extraHCL stri LocalBindPort: 1235, }, }, + Mode: api.ProxyModeTransparent, + TransparentProxy: &api.TransparentProxyConfig{ + OutboundListenerPort: 808, + }, }, } diff --git a/agent/structs/connect_proxy_config_test.go b/agent/structs/connect_proxy_config_test.go index df680a0690..e57054a8fe 100644 --- a/agent/structs/connect_proxy_config_test.go +++ b/agent/structs/connect_proxy_config_test.go @@ -46,6 +46,10 @@ func TestConnectProxyConfig_ToAPI(t *testing.T) { LocalBindAddress: "127.10.10.10", }, }, + Mode: ProxyModeTransparent, + TransparentProxy: TransparentProxyConfig{ + OutboundListenerPort: 808, + }, }, want: &api.AgentServiceConnectProxyConfig{ DestinationServiceName: "web", @@ -76,6 +80,10 @@ func TestConnectProxyConfig_ToAPI(t *testing.T) { LocalBindAddress: "127.10.10.10", }, }, + Mode: api.ProxyModeTransparent, + TransparentProxy: &api.TransparentProxyConfig{ + OutboundListenerPort: 808, + }, }, }, } diff --git a/command/services/config_test.go b/command/services/config_test.go index ccf0d36228..d0bd35bfa4 100644 --- a/command/services/config_test.go +++ b/command/services/config_test.go @@ -122,6 +122,10 @@ func TestStructsToAgentService(t *testing.T) { LocalServiceAddress: "127.0.0.1", LocalServicePort: 8181, Upstreams: structs.TestUpstreams(t), + Mode: structs.ProxyModeTransparent, + TransparentProxy: structs.TransparentProxyConfig{ + OutboundListenerPort: 808, + }, Config: map[string]interface{}{ "foo": "bar", }, @@ -138,6 +142,10 @@ func TestStructsToAgentService(t *testing.T) { LocalServiceAddress: "127.0.0.1", LocalServicePort: 8181, Upstreams: structs.TestUpstreams(t).ToAPI(), + Mode: api.ProxyModeTransparent, + TransparentProxy: &api.TransparentProxyConfig{ + OutboundListenerPort: 808, + }, Config: map[string]interface{}{ "foo": "bar", },