mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Revert the WithContext changes to vault tests (#14947)
This commit is contained in:
committed by
GitHub
parent
48b43e9213
commit
e7b5b2a48d
@@ -1,7 +1,6 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -23,13 +22,13 @@ func testLeaseLookupCommand(tb testing.TB) (*cli.MockUi, *LeaseLookupCommand) {
|
||||
// testLeaseLookupCommandMountAndLease mounts a leased secret backend and returns
|
||||
// the leaseID of an item.
|
||||
func testLeaseLookupCommandMountAndLease(tb testing.TB, client *api.Client) string {
|
||||
if err := client.Sys().MountWithContext(context.Background(), "testing", &api.MountInput{
|
||||
if err := client.Sys().Mount("testing", &api.MountInput{
|
||||
Type: "generic-leased",
|
||||
}); err != nil {
|
||||
tb.Fatal(err)
|
||||
}
|
||||
|
||||
if _, err := client.Logical().WriteWithContext(context.Background(), "testing/foo", map[string]interface{}{
|
||||
if _, err := client.Logical().Write("testing/foo", map[string]interface{}{
|
||||
"key": "value",
|
||||
"lease": "5m",
|
||||
}); err != nil {
|
||||
@@ -37,7 +36,7 @@ func testLeaseLookupCommandMountAndLease(tb testing.TB, client *api.Client) stri
|
||||
}
|
||||
|
||||
// Read the secret back to get the leaseID
|
||||
secret, err := client.Logical().ReadWithContext(context.Background(), "testing/foo")
|
||||
secret, err := client.Logical().Read("testing/foo")
|
||||
if err != nil {
|
||||
tb.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user