Update plugin deps to include context changes (#3765)

* Update plugin deps to include context changes

* Fix tests
This commit is contained in:
Brian Kassouf
2018-01-08 12:26:13 -08:00
committed by GitHub
parent 202a7aec2c
commit 2a3243546a
20 changed files with 306 additions and 159 deletions

View File

@@ -1,6 +1,7 @@
package framework
import (
"context"
"testing"
"github.com/hashicorp/vault/logical"
@@ -20,7 +21,7 @@ func TestPathStruct(t *testing.T) {
var b logical.Backend = &Backend{Paths: p.Paths()}
// Write via HTTP
_, err := b.HandleRequest(&logical.Request{
_, err := b.HandleRequest(context.Background(), &logical.Request{
Operation: logical.UpdateOperation,
Path: "bar",
Data: map[string]interface{}{
@@ -33,7 +34,7 @@ func TestPathStruct(t *testing.T) {
}
// Read via HTTP
resp, err := b.HandleRequest(&logical.Request{
resp, err := b.HandleRequest(context.Background(), &logical.Request{
Operation: logical.ReadOperation,
Path: "bar",
Storage: storage,
@@ -55,7 +56,7 @@ func TestPathStruct(t *testing.T) {
}
// Delete via HTTP
resp, err = b.HandleRequest(&logical.Request{
resp, err = b.HandleRequest(context.Background(), &logical.Request{
Operation: logical.DeleteOperation,
Path: "bar",
Data: nil,
@@ -69,7 +70,7 @@ func TestPathStruct(t *testing.T) {
}
// Re-read via HTTP
resp, err = b.HandleRequest(&logical.Request{
resp, err = b.HandleRequest(context.Background(), &logical.Request{
Operation: logical.ReadOperation,
Path: "bar",
Storage: storage,