Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
eikenb committed May 2, 2023
1 parent 58e13d7 commit 3b94649
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions agent/connect/ca/provider_vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1147,29 +1147,21 @@ func TestVaultCAProvider_GenerateIntermediate(t *testing.T) {

func TestVaultCAProvider_AutoTidyExpiredIssuers(t *testing.T) {
SkipIfVaultNotPresent(t)

t.Parallel()

testVault := NewTestVaultServer(t)

attr := &VaultTokenAttributes{
RootPath: "pki-root",
IntermediatePath: "pki-intermediate",
ConsulManaged: true,
}
token := CreateVaultTokenWithAttrs(t, testVault.client, attr)
provider := createVaultProvider(t, true, testVault.Addr, token,
map[string]any{
"RootPKIPath": "pki-root/",
"IntermediatePKIPath": "pki-intermediate/",
})

provider := createVaultProvider(t, true, testVault.Addr, token, map[string]any{
"RootPKIPath": "pki-root/",
"IntermediatePKIPath": "pki-intermediate/",
})

// this runs the auto-tidy config call but we can't test that as there
// is no way to check. so we re-set it again below checking that it works.
_, err := provider.ActiveLeafSigningCert()
require.NoError(t, err)

fmt.Println("vaultTestVersion:", vaultTestVersion)
version := strings.Split(vaultTestVersion, ".")
require.Len(t, version, 3)
minorVersion, err := strconv.Atoi(version[1])
Expand Down

0 comments on commit 3b94649

Please sign in to comment.