mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Add context-aware functions to vault/api (#14388)
This commit is contained in:
committed by
GitHub
parent
fea828993c
commit
8234a663e7
@@ -1,6 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -88,7 +89,7 @@ func TestSecretsDisableCommand_Run(t *testing.T) {
|
||||
client, closer := testVaultServer(t)
|
||||
defer closer()
|
||||
|
||||
if err := client.Sys().Mount("my-secret/", &api.MountInput{
|
||||
if err := client.Sys().MountWithContext(context.Background(), "my-secret/", &api.MountInput{
|
||||
Type: "generic",
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -110,7 +111,7 @@ func TestSecretsDisableCommand_Run(t *testing.T) {
|
||||
t.Errorf("expected %q to contain %q", combined, expected)
|
||||
}
|
||||
|
||||
mounts, err := client.Sys().ListMounts()
|
||||
mounts, err := client.Sys().ListMountsWithContext(context.Background())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user