Skip to content

Commit

Permalink
chore(docs): add mock info and fix test name
Browse files Browse the repository at this point in the history
  • Loading branch information
thevilledev committed Jul 17, 2023
1 parent e042fc1 commit 03ec39f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
20 changes: 19 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,22 @@ This creates a local Vault installation in development mode and enables the plug

## Configuring the plugin

Follow [the configuration guide](configuration.md).
Follow [the configuration guide](configuration.md).

## Mock usage

By setting the API key to `mock` the plugin is forced to use the mock API client, which does not communciate
with the Vercel API at all. Useful for development purposes and refactoring. The returned `bearer_token` is hard coded to `some-bearer-token`.

```
$ vault write vercel-secrets/config api_key=mock
$ vault read vercel-secrets/token
Key Value
--- -----
lease_id vercel-secrets/token/BIxRweNgXNSQsnbeBBmiea8X
lease_duration 10m
lease_renewable false
bearer_token some-bearer-token
team_id n/a
token_id vault-plugin-secrets-vercel-1689595722412039000-1689595722412067000
```
2 changes: 1 addition & 1 deletion internal/plugin/path_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestToken_Create2(t *testing.T) {
func TestToken_Create(t *testing.T) {
t.Parallel()

cases := map[string]struct {
Expand Down

0 comments on commit 03ec39f

Please sign in to comment.