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

@@ -1,6 +1,7 @@
package command
import (
"context"
"reflect"
"strings"
"testing"
@@ -115,7 +116,7 @@ func TestTokenCreateCommand_Run(t *testing.T) {
}
token := strings.TrimSpace(ui.OutputWriter.String())
secret, err := client.Auth().Token().Lookup(token)
secret, err := client.Auth().Token().LookupWithContext(context.Background(), token)
if secret == nil || err != nil {
t.Fatal(err)
}
@@ -140,7 +141,7 @@ func TestTokenCreateCommand_Run(t *testing.T) {
}
token := strings.TrimSpace(ui.OutputWriter.String())
secret, err := client.Auth().Token().Lookup(token)
secret, err := client.Auth().Token().LookupWithContext(context.Background(), token)
if secret == nil || err != nil {
t.Fatal(err)
}
@@ -176,7 +177,7 @@ func TestTokenCreateCommand_Run(t *testing.T) {
}
token := strings.TrimSpace(ui.OutputWriter.String())
secret, err := client.Auth().Token().Lookup(token)
secret, err := client.Auth().Token().LookupWithContext(context.Background(), token)
if secret == nil || err != nil {
t.Fatal(err)
}