From 4aa0a0b2a3efa37d663e4c4b874d0ff469b9d0fa Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Tue, 4 May 2021 18:30:20 -0700 Subject: [PATCH] Fixup agent/config tests Signed-off-by: Mark Anderson --- agent/config/runtime_test.go | 7 +++++++ .../config/testdata/TestRuntimeConfig_Sanitize.golden | 1 + agent/config/testdata/full-config.hcl | 8 +++++--- agent/config/testdata/full-config.json | 10 ++++++---- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/agent/config/runtime_test.go b/agent/config/runtime_test.go index efc22568af..397e49e931 100644 --- a/agent/config/runtime_test.go +++ b/agent/config/runtime_test.go @@ -5648,6 +5648,13 @@ func TestLoad_FullConfig(t *testing.T) { LocalBindPort: 11884, LocalBindAddress: "127.24.88.0", }, + { + DestinationType: "prepared_query", + DestinationNamespace: "9nakw0td", + DestinationName: "placeholder", + LocalBindSocketPath: "/foo/bar/upstream", + LocalBindSocketMode: "0600", + }, }, Expose: structs.ExposeConfig{ Checks: true, diff --git a/agent/config/testdata/TestRuntimeConfig_Sanitize.golden b/agent/config/testdata/TestRuntimeConfig_Sanitize.golden index 9e4ceb1ac0..b27fe76855 100644 --- a/agent/config/testdata/TestRuntimeConfig_Sanitize.golden +++ b/agent/config/testdata/TestRuntimeConfig_Sanitize.golden @@ -325,6 +325,7 @@ "Name": "foo", "Port": 0, "Proxy": null, + "SocketPath": "", "TaggedAddresses": {}, "Tags": [], "Token": "hidden", diff --git a/agent/config/testdata/full-config.hcl b/agent/config/testdata/full-config.hcl index f0c6f083f7..a54ca30908 100644 --- a/agent/config/testdata/full-config.hcl +++ b/agent/config/testdata/full-config.hcl @@ -362,7 +362,6 @@ service = { address = "cOlSOhbp" token = "msy7iWER" port = 24237 - socket_path = "/tmp/rc78ap" weights = { passing = 100, warning = 1 @@ -456,7 +455,6 @@ services = [ address = "9RhqPSPB" token = "myjKJkWH" port = 72219 - socket_path = "/foo/bar/sock_7IszXMQ1" enable_tag_override = true check = { id = "qmfeO5if" @@ -563,7 +561,6 @@ services = [ destination_service_id = "6L6BVfgH-id" local_service_address = "127.0.0.2" local_service_port = 23759 - local_service_socket_path = "/foo/bar/local" config { cedGGtZf = "pWrUNiWw" } @@ -581,6 +578,11 @@ services = [ destination_name = "KSd8HsRl" local_bind_port = 11884 local_bind_address = "127.24.88.0" + }, + { + destination_type = "prepared_query" + destination_namespace = "9nakw0td" + destination_name = "placeholder" local_bind_socket_path = "/foo/bar/upstream" local_bind_socket_mode = "0600" }, diff --git a/agent/config/testdata/full-config.json b/agent/config/testdata/full-config.json index 6dd73a01cf..06d8966e23 100644 --- a/agent/config/testdata/full-config.json +++ b/agent/config/testdata/full-config.json @@ -358,7 +358,6 @@ "address": "cOlSOhbp", "token": "msy7iWER", "port": 24237, - "socket_path": "/tmp/rc78ap", "weights": { "passing": 100, "warning": 1 @@ -453,7 +452,6 @@ "address": "9RhqPSPB", "token": "myjKJkWH", "port": 72219, - "socket_path":"/foo/bar/sock_7IszXMQ1", "enable_tag_override": true, "check": { "id": "qmfeO5if", @@ -563,7 +561,6 @@ "destination_service_name": "6L6BVfgH", "local_service_address": "127.0.0.2", "local_service_port": 23759, - "local_service_socket_path": "/foo/bar/local", "expose": { "checks": true, "paths": [ @@ -592,7 +589,12 @@ "destination_namespace": "9nakw0td", "destination_type": "prepared_query", "local_bind_address": "127.24.88.0", - "local_bind_port": 11884, + "local_bind_port": 11884 + }, + { + "destination_name": "placeholder", + "destination_namespace": "9nakw0td", + "destination_type": "prepared_query", "local_bind_socket_path": "/foo/bar/upstream", "local_bind_socket_mode": "0600" }