Misc test fixes
This commit is contained in:
parent
ca68136ac7
commit
ba6e909ed7
|
@ -2911,7 +2911,7 @@ func TestAgentConnectProxyConfig_Blocking(t *testing.T) {
|
||||||
ur, err := copystructure.Copy(expectedResponse)
|
ur, err := copystructure.Copy(expectedResponse)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
updatedResponse := ur.(*api.ConnectProxyConfig)
|
updatedResponse := ur.(*api.ConnectProxyConfig)
|
||||||
updatedResponse.ContentHash = "29d7e419862bc848"
|
updatedResponse.ContentHash = "8f2f6b5f2496acd8"
|
||||||
upstreams := updatedResponse.Config["upstreams"].([]interface{})
|
upstreams := updatedResponse.Config["upstreams"].([]interface{})
|
||||||
upstreams = append(upstreams,
|
upstreams = append(upstreams,
|
||||||
map[string]interface{}{
|
map[string]interface{}{
|
||||||
|
|
|
@ -4424,7 +4424,8 @@ func TestSanitize(t *testing.T) {
|
||||||
"FilterDefault": false,
|
"FilterDefault": false,
|
||||||
"MetricsPrefix": "",
|
"MetricsPrefix": "",
|
||||||
"PrometheusRetentionTime": "0s",
|
"PrometheusRetentionTime": "0s",
|
||||||
"StatsdAddr": ""
|
"StatsdAddr": "",
|
||||||
|
"StatsiteAddr": ""
|
||||||
},
|
},
|
||||||
"TranslateWANAddrs": false,
|
"TranslateWANAddrs": false,
|
||||||
"UIDir": "",
|
"UIDir": "",
|
||||||
|
|
|
@ -1045,7 +1045,7 @@ func TestAPI_AgentConnectCARoots_empty(t *testing.T) {
|
||||||
|
|
||||||
require := require.New(t)
|
require := require.New(t)
|
||||||
c, s := makeClientWithConfig(t, nil, func(c *testutil.TestServerConfig) {
|
c, s := makeClientWithConfig(t, nil, func(c *testutil.TestServerConfig) {
|
||||||
c.Connect = nil // disable connect to prevent CA beening bootstrapped
|
c.Connect = nil // disable connect to prevent CA being bootstrapped
|
||||||
})
|
})
|
||||||
defer s.Stop()
|
defer s.Stop()
|
||||||
|
|
||||||
|
@ -1162,8 +1162,8 @@ func TestAPI_AgentConnectProxyConfig(t *testing.T) {
|
||||||
"foo": "bar",
|
"foo": "bar",
|
||||||
"local_service_address": "127.0.0.1:8000",
|
"local_service_address": "127.0.0.1:8000",
|
||||||
"telemetry": map[string]interface{}{
|
"telemetry": map[string]interface{}{
|
||||||
"FilterDefault": true,
|
"filter_default": true,
|
||||||
"MetricsPrefix": "consul.proxy.foo",
|
"metrics_prefix": "consul.proxy.foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,6 +143,9 @@ func defaultServerConfig() *TestServerConfig {
|
||||||
// const TestClusterID causes import cycle so hard code it here.
|
// const TestClusterID causes import cycle so hard code it here.
|
||||||
"cluster_id": "11111111-2222-3333-4444-555555555555",
|
"cluster_id": "11111111-2222-3333-4444-555555555555",
|
||||||
},
|
},
|
||||||
|
"proxy": map[string]interface{}{
|
||||||
|
"allow_managed_api_registration": true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -653,7 +653,14 @@ func TestConnectLeafWatch(t *testing.T) {
|
||||||
|
|
||||||
func TestConnectProxyConfigWatch(t *testing.T) {
|
func TestConnectProxyConfigWatch(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
a := agent.NewTestAgent(t.Name(), ``)
|
a := agent.NewTestAgent(t.Name(), `
|
||||||
|
connect {
|
||||||
|
enabled = true
|
||||||
|
proxy {
|
||||||
|
allow_managed_api_registration = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`)
|
||||||
defer a.Shutdown()
|
defer a.Shutdown()
|
||||||
|
|
||||||
// Register a local agent service with a managed proxy
|
// Register a local agent service with a managed proxy
|
||||||
|
|
Loading…
Reference in New Issue