Skip to content

Commit

Permalink
Add testonly endpoints for Identity testing
Browse files Browse the repository at this point in the history
  • Loading branch information
biazmoreira committed Jan 30, 2025
1 parent 46ee2d0 commit 0331fcd
Show file tree
Hide file tree
Showing 3 changed files with 850 additions and 0 deletions.
1 change: 1 addition & 0 deletions vault/identity_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func NewIdentityStore(ctx context.Context, core *Core, config *logical.BackendCo
func (i *IdentityStore) paths() []*framework.Path {
return framework.PathAppend(
entityPaths(i),
entityTestonlyPaths(i),
aliasPaths(i),
groupAliasPaths(i),
groupPaths(i),
Expand Down
13 changes: 13 additions & 0 deletions vault/identity_store_injector.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1

//go:build !testonly

package vault

import "github.com/hashicorp/vault/sdk/framework"

// entityTestonlyPaths is a stub for non-testonly builds.
func entityTestonlyPaths(i *IdentityStore) []*framework.Path {
return nil
}
Loading

0 comments on commit 0331fcd

Please sign in to comment.