diff --git a/vault/policy_store_test.go b/vault/policy_store_test.go index 337e45a46..1342d8391 100644 --- a/vault/policy_store_test.go +++ b/vault/policy_store_test.go @@ -5,34 +5,9 @@ import ( "reflect" "testing" - log "github.com/hashicorp/go-hclog" "github.com/hashicorp/vault/helper/namespace" - "github.com/hashicorp/vault/sdk/helper/logging" - "github.com/hashicorp/vault/sdk/logical" ) -func mockPolicyStore(t *testing.T) *PolicyStore { - _, barrier, _ := mockBarrier(t) - view := NewBarrierView(barrier, "foo/") - p, err := NewPolicyStore(context.Background(), nil, view, logical.TestSystemView(), logging.NewVaultLogger(log.Trace)) - if err != nil { - t.Fatal(err) - } - return p -} - -func mockPolicyStoreNoCache(t *testing.T) *PolicyStore { - sysView := logical.TestSystemView() - sysView.CachingDisabledVal = true - _, barrier, _ := mockBarrier(t) - view := NewBarrierView(barrier, "foo/") - p, err := NewPolicyStore(context.Background(), nil, view, sysView, logging.NewVaultLogger(log.Trace)) - if err != nil { - t.Fatal(err) - } - return p -} - func mockPolicyWithCore(t *testing.T, disableCache bool) (*Core, *PolicyStore) { conf := &CoreConfig{ DisableCache: disableCache, diff --git a/vault/token_store_test.go b/vault/token_store_test.go index 4b16409eb..a2dc29728 100644 --- a/vault/token_store_test.go +++ b/vault/token_store_test.go @@ -540,10 +540,6 @@ func getBackendConfig(c *Core) *logical.BackendConfig { } } -func testMakeBatchTokenViaBackend(t testing.TB, ts *TokenStore, root, client, ttl string, policy []string) { - testMakeTokenViaBackend(t, ts, root, client, ttl, policy, true) -} - func testMakeServiceTokenViaBackend(t testing.TB, ts *TokenStore, root, client, ttl string, policy []string) { testMakeTokenViaBackend(t, ts, root, client, ttl, policy, false) } @@ -647,10 +643,6 @@ func testMakeServiceTokenViaCore(t testing.TB, c *Core, root, client, ttl string testMakeTokenViaCore(t, c, root, client, ttl, policy, false, nil) } -func testMakeBatchTokenViaCore(t testing.TB, c *Core, root, client, ttl string, policy []string) { - testMakeTokenViaCore(t, c, root, client, ttl, policy, true, nil) -} - func testMakeTokenViaCore(t testing.TB, c *Core, root, client, ttl string, policy []string, batch bool, outAuth *logical.Auth) { req := logical.TestRequest(t, logical.UpdateOperation, "auth/token/create") req.ClientToken = root