Vault test cluster helper refactorings, mostly audit related (#18928)

* Move some test helper stuff from the vault package to a new helper/testhelpers/corehelpers package.  Consolidate on a single "noop audit" implementation.
This commit is contained in:
Nick Cabatoff
2023-02-01 08:33:16 -05:00
committed by GitHub
parent 6a9ca261d1
commit 970ed07b04
26 changed files with 562 additions and 612 deletions

View File

@@ -13,8 +13,8 @@ import (
"time"
"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/helper/testhelpers/corehelpers"
"github.com/hashicorp/vault/sdk/logical"
"golang.org/x/crypto/ssh"
"github.com/hashicorp/vault/builtin/credential/userpass"
@@ -519,7 +519,7 @@ func newTestingFactory(t *testing.T) func(ctx context.Context, conf *logical.Bac
defaultLeaseTTLVal := 2 * time.Minute
maxLeaseTTLVal := 10 * time.Minute
return Factory(context.Background(), &logical.BackendConfig{
Logger: vault.NewTestLogger(t),
Logger: corehelpers.NewTestLogger(t),
StorageView: &logical.InmemStorage{},
System: &logical.StaticSystemView{
DefaultLeaseTTLVal: defaultLeaseTTLVal,