Misc test fixes

This commit is contained in:
Paul Banks 2018-06-14 14:07:33 +01:00 committed by Jack Pearkes
parent ca68136ac7
commit ba6e909ed7
5 changed files with 17 additions and 6 deletions

View File

@ -2911,7 +2911,7 @@ func TestAgentConnectProxyConfig_Blocking(t *testing.T) {
ur, err := copystructure.Copy(expectedResponse)
require.NoError(t, err)
updatedResponse := ur.(*api.ConnectProxyConfig)
updatedResponse.ContentHash = "29d7e419862bc848"
updatedResponse.ContentHash = "8f2f6b5f2496acd8"
upstreams := updatedResponse.Config["upstreams"].([]interface{})
upstreams = append(upstreams,
map[string]interface{}{

View File

@ -4424,7 +4424,8 @@ func TestSanitize(t *testing.T) {
"FilterDefault": false,
"MetricsPrefix": "",
"PrometheusRetentionTime": "0s",
"StatsdAddr": ""
"StatsdAddr": "",
"StatsiteAddr": ""
},
"TranslateWANAddrs": false,
"UIDir": "",

View File

@ -1045,7 +1045,7 @@ func TestAPI_AgentConnectCARoots_empty(t *testing.T) {
require := require.New(t)
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()
@ -1162,8 +1162,8 @@ func TestAPI_AgentConnectProxyConfig(t *testing.T) {
"foo": "bar",
"local_service_address": "127.0.0.1:8000",
"telemetry": map[string]interface{}{
"FilterDefault": true,
"MetricsPrefix": "consul.proxy.foo",
"filter_default": true,
"metrics_prefix": "consul.proxy.foo",
},
},
}

View File

@ -143,6 +143,9 @@ func defaultServerConfig() *TestServerConfig {
// const TestClusterID causes import cycle so hard code it here.
"cluster_id": "11111111-2222-3333-4444-555555555555",
},
"proxy": map[string]interface{}{
"allow_managed_api_registration": true,
},
},
}
}

View File

@ -653,7 +653,14 @@ func TestConnectLeafWatch(t *testing.T) {
func TestConnectProxyConfigWatch(t *testing.T) {
t.Parallel()
a := agent.NewTestAgent(t.Name(), ``)
a := agent.NewTestAgent(t.Name(), `
connect {
enabled = true
proxy {
allow_managed_api_registration = true
}
}
`)
defer a.Shutdown()
// Register a local agent service with a managed proxy