Browse Source

appease the retry linter (#6629)

pull/6628/head
R.B. Boyer 5 years ago committed by GitHub
parent
commit
040f47c46e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      agent/consul/leader_connect_test.go

12
agent/consul/leader_connect_test.go

@ -339,22 +339,20 @@ func TestLeader_SecondaryCA_FixSigningKeyID_via_IntermediateRefresh(t *testing.T
// isn't a super clean way to watch specifically until it's done than polling
// the CA provider anyway.
retry.Run(t, func(r *retry.R) {
require := require.New(r)
// verify that the root is now corrected
provider, activeRoot := s2.getCAProvider()
require.NotNil(provider)
require.NotNil(activeRoot)
require.NotNil(r, provider)
require.NotNil(r, activeRoot)
activeIntermediate, err := provider.ActiveIntermediate()
require.NoError(err)
require.NoError(r, err)
intermediateCert, err := connect.ParseCert(activeIntermediate)
require.NoError(err)
require.NoError(r, err)
// Force this to be derived just from the root, not the intermediate.
expect := connect.EncodeSigningKeyID(intermediateCert.SubjectKeyId)
require.Equal(expect, activeRoot.SigningKeyID)
require.Equal(r, expect, activeRoot.SigningKeyID)
})
}

Loading…
Cancel
Save