More test tweaks

This commit is contained in:
Paul Banks 2018-06-13 20:43:34 +01:00 committed by Jack Pearkes
parent d6b13463ed
commit 8f26c9c3b9
2 changed files with 4 additions and 4 deletions

View File

@ -2679,6 +2679,9 @@ func TestAgentConnectCALeafCert_good(t *testing.T) {
obj, err := a.srv.AgentConnectCALeafCert(resp, req)
require.NoError(err)
// That should've been a cache miss, so no hit change.
require.Equal(cacheHits, a.cache.Hits())
// Get the issued cert
issued, ok := obj.(*structs.IssuedCert)
assert.True(ok)
@ -2691,9 +2694,6 @@ func TestAgentConnectCALeafCert_good(t *testing.T) {
assert.Equal(fmt.Sprintf("%d", issued.ModifyIndex),
resp.Header().Get("X-Consul-Index"))
// That should've been a cache miss, so no hit change
require.Equal(cacheHits, a.cache.Hits())
// Test caching
{
// Fetch it again

View File

@ -108,7 +108,7 @@ type ConnectManagedProxy struct {
// ConnectManagedProxyConfig represents the parts of the proxy config the agent
// needs to understand. It's bad UX to make the user specify these separately
// just to make parsing simpler for us so this encapsulates the fields in
// ConnectManagedProxy.Config that we care about. They are all optoinal anyway
// ConnectManagedProxy.Config that we care about. They are all optional anyway
// and this is used to decode them with mapstructure.
type ConnectManagedProxyConfig struct {
BindAddress string `mapstructure:"bind_address"`