Add context-aware functions to vault/api (#14388)

This commit is contained in:
Anton Averchenkov
2022-03-23 17:47:43 -04:00
committed by GitHub
parent fea828993c
commit 8234a663e7
130 changed files with 2114 additions and 1463 deletions

View File

@@ -2,6 +2,7 @@ package command
import (
"bytes"
"context"
"encoding/json"
"io/ioutil"
"os"
@@ -59,7 +60,7 @@ func TestOperatorUnsealCommand_Run(t *testing.T) {
}
// Enter an unseal key
if _, err := client.Sys().Unseal(keys[0]); err != nil {
if _, err := client.Sys().UnsealWithContext(context.Background(), keys[0]); err != nil {
t.Fatal(err)
}
@@ -106,7 +107,7 @@ func TestOperatorUnsealCommand_Run(t *testing.T) {
}
}
status, err := client.Sys().SealStatus()
status, err := client.Sys().SealStatusWithContext(context.Background())
if err != nil {
t.Fatal(err)
}