mirror of https://github.com/hashicorp/consul
Fix intermediate refresh test comments
parent
cc901dfd47
commit
876500e0dc
|
@ -193,6 +193,7 @@ func TestLeader_Vault_PrimaryCA_IntermediateRenew(t *testing.T) {
|
||||||
ca.CertificateTimeDriftBuffer = origDriftBuffer
|
ca.CertificateTimeDriftBuffer = origDriftBuffer
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
// Vault backdates certs by 30s by default.
|
||||||
ca.CertificateTimeDriftBuffer = 30 * time.Second
|
ca.CertificateTimeDriftBuffer = 30 * time.Second
|
||||||
structs.IntermediateCertRenewInterval = time.Millisecond
|
structs.IntermediateCertRenewInterval = time.Millisecond
|
||||||
structs.MinLeafCertTTL = time.Second
|
structs.MinLeafCertTTL = time.Second
|
||||||
|
@ -215,10 +216,6 @@ func TestLeader_Vault_PrimaryCA_IntermediateRenew(t *testing.T) {
|
||||||
// The retry loop only retries for 7sec max and
|
// The retry loop only retries for 7sec max and
|
||||||
// the ttl needs to be below so that it
|
// the ttl needs to be below so that it
|
||||||
// triggers definitely.
|
// triggers definitely.
|
||||||
// Since certs are created so that they are
|
|
||||||
// valid from 1minute in the past, we need to
|
|
||||||
// account for that, otherwise it will be
|
|
||||||
// expired immediately.
|
|
||||||
"IntermediateCertTTL": "5s",
|
"IntermediateCertTTL": "5s",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -228,7 +225,7 @@ func TestLeader_Vault_PrimaryCA_IntermediateRenew(t *testing.T) {
|
||||||
|
|
||||||
testrpc.WaitForLeader(t, s1.RPC, "dc1")
|
testrpc.WaitForLeader(t, s1.RPC, "dc1")
|
||||||
|
|
||||||
// Capture the current root
|
// Capture the current root.
|
||||||
var originalRoot *structs.CARoot
|
var originalRoot *structs.CARoot
|
||||||
{
|
{
|
||||||
rootList, activeRoot, err := getTestRoots(s1, "dc1")
|
rootList, activeRoot, err := getTestRoots(s1, "dc1")
|
||||||
|
@ -237,7 +234,7 @@ func TestLeader_Vault_PrimaryCA_IntermediateRenew(t *testing.T) {
|
||||||
originalRoot = activeRoot
|
originalRoot = activeRoot
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the original intermediate
|
// Get the original intermediate.
|
||||||
waitForActiveCARoot(t, s1, originalRoot)
|
waitForActiveCARoot(t, s1, originalRoot)
|
||||||
provider, _ := getCAProviderWithLock(s1)
|
provider, _ := getCAProviderWithLock(s1)
|
||||||
intermediatePEM, err := provider.ActiveIntermediate()
|
intermediatePEM, err := provider.ActiveIntermediate()
|
||||||
|
|
Loading…
Reference in New Issue