Skip to content

Commit

Permalink
Fix for PKI.TestStandby_Operations test to work in ENT (hashicorp#19647)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
stevendpclark authored Mar 20, 2023
1 parent 1723525 commit 94a6dca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions builtin/logical/pki/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit 94a6dca

Please sign in to comment.