Fix for PKI.TestStandby_Operations test to work in ENT (#19647)

* Fix for PKI.TestStandby_Operations test to work in ENT

 - Remove wait call to testhelpers.WaitForActiveNodeAndStandbys and
   leverage testhelpers.WaitForStandbyNode instead.

* Use InmemBackendSetup for a proper HA backend in ENT
This commit is contained in:
Steven Clark 2023-03-20 17:11:56 -04:00 committed by GitHub
parent 058710d33d
commit ae4b02e6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -33,6 +33,8 @@ import (
"testing" "testing"
"time" "time"
"github.com/hashicorp/vault/helper/testhelpers/teststorage"
"github.com/hashicorp/vault/helper/testhelpers" "github.com/hashicorp/vault/helper/testhelpers"
"github.com/hashicorp/vault/sdk/helper/testhelpers/schema" "github.com/hashicorp/vault/sdk/helper/testhelpers/schema"
@ -6413,13 +6415,12 @@ func TestUserIDsInLeafCerts(t *testing.T) {
// TestStandby_Operations test proper forwarding for PKI requests from a standby node to the // TestStandby_Operations test proper forwarding for PKI requests from a standby node to the
// active node within a cluster. // active node within a cluster.
func TestStandby_Operations(t *testing.T) { func TestStandby_Operations(t *testing.T) {
conf := &vault.CoreConfig{ conf, opts := teststorage.ClusterSetup(&vault.CoreConfig{
LogicalBackends: map[string]logical.Factory{ LogicalBackends: map[string]logical.Factory{
"pki": Factory, "pki": Factory,
}, },
} }, nil, teststorage.InmemBackendSetup)
opts := vault.TestClusterOptions{HandlerFunc: vaulthttp.Handler} cluster := vault.NewTestCluster(t, conf, opts)
cluster := vault.NewTestCluster(t, conf, &opts)
cluster.Start() cluster.Start()
defer cluster.Cleanup() defer cluster.Cleanup()