Skip to content

Commit

Permalink
don't store vault's dev root token
Browse files Browse the repository at this point in the history
Running the dependency/ tests runs vault in dev mode which created
~/.vault-token by default. This then persisted and messed with manual
testing if you didn't remember to remove it. Adding the option to the
tests to keep it from saving the token to that file.

Fixes #1353
  • Loading branch information
eikenb committed Mar 5, 2020
1 parent 08dac16 commit ee25ee4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dependency/dependency_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ func runTestVault() {
if err != nil || path == "" {
Fatalf("vault not found on $PATH")
}
args := []string{"server", "-dev", "-dev-root-token-id", vaultToken}
args := []string{"server", "-dev", "-dev-root-token-id", vaultToken,
"-dev-no-store-token"}
cmd := exec.Command("vault", args...)
cmd.Stdout = ioutil.Discard
cmd.Stderr = ioutil.Discard
Expand Down

0 comments on commit ee25ee4

Please sign in to comment.