From ae4b02e6c4e0a71af80f43092745fbbc40fefb6e Mon Sep 17 00:00:00 2001 From: Steven Clark Date: Mon, 20 Mar 2023 17:11:56 -0400 Subject: [PATCH] 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 --- builtin/logical/pki/backend_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/builtin/logical/pki/backend_test.go b/builtin/logical/pki/backend_test.go index b6bfeb292..aafa932b6 100644 --- a/builtin/logical/pki/backend_test.go +++ b/builtin/logical/pki/backend_test.go @@ -33,6 +33,8 @@ import ( "testing" "time" + "github.com/hashicorp/vault/helper/testhelpers/teststorage" + "github.com/hashicorp/vault/helper/testhelpers" "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 // active node within a cluster. func TestStandby_Operations(t *testing.T) { - conf := &vault.CoreConfig{ + conf, opts := teststorage.ClusterSetup(&vault.CoreConfig{ LogicalBackends: map[string]logical.Factory{ "pki": Factory, }, - } - opts := vault.TestClusterOptions{HandlerFunc: vaulthttp.Handler} - cluster := vault.NewTestCluster(t, conf, &opts) + }, nil, teststorage.InmemBackendSetup) + cluster := vault.NewTestCluster(t, conf, opts) cluster.Start() defer cluster.Cleanup()