Browse Source

Fixup agent/config tests

Signed-off-by: Mark Anderson <manderson@hashicorp.com>
pull/10185/head
Mark Anderson 4 years ago
parent
commit
4aa0a0b2a3
  1. 7
      agent/config/runtime_test.go
  2. 1
      agent/config/testdata/TestRuntimeConfig_Sanitize.golden
  3. 8
      agent/config/testdata/full-config.hcl
  4. 10
      agent/config/testdata/full-config.json

7
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,

1
agent/config/testdata/TestRuntimeConfig_Sanitize.golden vendored

@ -325,6 +325,7 @@
"Name": "foo",
"Port": 0,
"Proxy": null,
"SocketPath": "",
"TaggedAddresses": {},
"Tags": [],
"Token": "hidden",

8
agent/config/testdata/full-config.hcl vendored

@ -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"
},

10
agent/config/testdata/full-config.json vendored

@ -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"
}

Loading…
Cancel
Save