Skip to content

Commit

Permalink
backport of commit d51ae03 (hashicorp#20423)
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Black <raskchanky@users.noreply.github.com>
  • Loading branch information
1 parent 657c287 commit 740344b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions sdk/helper/consts/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,8 @@ const (
VaultEnableFilePermissionsCheckEnv = "VAULT_ENABLE_FILE_PERMISSIONS_CHECK"

VaultDisableUserLockout = "VAULT_DISABLE_USER_LOCKOUT"

PerformanceReplicationPathTarget = "performance"

DRReplicationPathParget = "dr"
)
8 changes: 0 additions & 8 deletions vault/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,6 @@ type Core struct {
// CORS Information
corsConfig *CORSConfig

// The active set of upstream cluster addresses; stored via the Echo
// mechanism, loaded by the balancer
atomicPrimaryClusterAddrs *atomic.Value

atomicPrimaryFailoverAddrs *atomic.Value

// replicationState keeps the current replication state cached for quick
// lookup; activeNodeReplicationState stores the active value on standbys
replicationState *uint32
Expand Down Expand Up @@ -974,8 +968,6 @@ func CreateCore(conf *CoreConfig) (*Core, error) {
introspectionEnabled: conf.EnableIntrospection,
shutdownDoneCh: new(atomic.Value),
replicationState: new(uint32),
atomicPrimaryClusterAddrs: new(atomic.Value),
atomicPrimaryFailoverAddrs: new(atomic.Value),
localClusterPrivateKey: new(atomic.Value),
localClusterCert: new(atomic.Value),
localClusterParsedCert: new(atomic.Value),
Expand Down
8 changes: 8 additions & 0 deletions vault/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,10 @@ func (c *TestClusterCore) Seal(t testing.T) {
}
}

func (c *TestClusterCore) LogicalStorage() logical.Storage {
return c.barrier
}

func (c *TestClusterCore) stop() error {
c.Logger().Info("stopping vault test core")

Expand Down Expand Up @@ -1020,6 +1024,10 @@ func (c *TestClusterCore) TLSConfig() *tls.Config {
return c.tlsConfig.Clone()
}

func (c *TestClusterCore) ClusterListener() *cluster.Listener {
return c.getClusterListener()
}

func (c *TestCluster) Cleanup() {
c.Logger.Info("cleaning up vault cluster")
if tl, ok := c.Logger.(*corehelpers.TestLogger); ok {
Expand Down

0 comments on commit 740344b

Please sign in to comment.