Add context to storage backends and wire it through a lot of places (#3817)

This commit is contained in:
Brian Kassouf
2018-01-18 22:44:44 -08:00
committed by Jeff Mitchell
parent 2864fbd697
commit 8142b42d95
341 changed files with 3417 additions and 3083 deletions

View File

@@ -79,7 +79,7 @@ func TestBackend_config_connection(t *testing.T) {
var err error
config := logical.TestBackendConfig()
config.StorageView = &logical.InmemStorage{}
b, err := Factory(config)
b, err := Factory(context.Background(), config)
if err != nil {
t.Fatal(err)
}
@@ -118,7 +118,7 @@ func TestBackend_config_connection(t *testing.T) {
func TestBackend_basic(t *testing.T) {
config := logical.TestBackendConfig()
config.StorageView = &logical.InmemStorage{}
b, err := Factory(config)
b, err := Factory(context.Background(), config)
if err != nil {
t.Fatal(err)
}
@@ -144,7 +144,7 @@ func TestBackend_basic(t *testing.T) {
func TestBackend_roleCrud(t *testing.T) {
config := logical.TestBackendConfig()
config.StorageView = &logical.InmemStorage{}
b, err := Factory(config)
b, err := Factory(context.Background(), config)
if err != nil {
t.Fatal(err)
}
@@ -172,7 +172,7 @@ func TestBackend_roleCrud(t *testing.T) {
func TestBackend_BlockStatements(t *testing.T) {
config := logical.TestBackendConfig()
config.StorageView = &logical.InmemStorage{}
b, err := Factory(config)
b, err := Factory(context.Background(), config)
if err != nil {
t.Fatal(err)
}
@@ -204,7 +204,7 @@ func TestBackend_BlockStatements(t *testing.T) {
func TestBackend_roleReadOnly(t *testing.T) {
config := logical.TestBackendConfig()
config.StorageView = &logical.InmemStorage{}
b, err := Factory(config)
b, err := Factory(context.Background(), config)
if err != nil {
t.Fatal(err)
}
@@ -237,7 +237,7 @@ func TestBackend_roleReadOnly(t *testing.T) {
func TestBackend_roleReadOnly_revocationSQL(t *testing.T) {
config := logical.TestBackendConfig()
config.StorageView = &logical.InmemStorage{}
b, err := Factory(config)
b, err := Factory(context.Background(), config)
if err != nil {
t.Fatal(err)
}