OSS portion of additional DR failover tests (#20842)

This commit is contained in:
Hamid Ghaf
2023-05-30 08:41:33 -07:00
committed by GitHub
parent 3a02eb30bf
commit 288399f228
2 changed files with 5 additions and 2 deletions

View File

@@ -52,6 +52,9 @@ func NewReplicationSetDocker(t *testing.T, opts *DockerClusterOptions) (*testclu
r.Builder = func(ctx context.Context, name string, baseLogger hclog.Logger) (testcluster.VaultCluster, error) {
myOpts := *opts
myOpts.Logger = baseLogger.Named(name)
if myOpts.ClusterName == "" {
myOpts.ClusterName = strings.ReplaceAll(t.Name(), "/", "-")
}
myOpts.ClusterName += "-" + strings.ReplaceAll(name, "/", "-")
myOpts.CA = r.CA
return NewTestDockerCluster(t, &myOpts), nil

View File

@@ -2333,7 +2333,7 @@ func (c *Core) DecodeSSCToken(token string) (string, error) {
if !IsSSCToken(token) {
return token, nil
}
tok, err := c.DecodeSSCTokenInternal(token)
tok, err := DecodeSSCTokenInternal(token)
if err != nil {
return "", err
}
@@ -2342,7 +2342,7 @@ func (c *Core) DecodeSSCToken(token string) (string, error) {
// DecodeSSCTokenInternal is a helper used to get the inner part of a SSC token without
// checking the token signature or the WAL index.
func (c *Core) DecodeSSCTokenInternal(token string) (*tokens.Token, error) {
func DecodeSSCTokenInternal(token string) (*tokens.Token, error) {
signedToken := &tokens.SignedToken{}
// Skip batch and old style service tokens. These can have the prefix "b.",