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