Commit 77581144 authored by Martin Atkins's avatar Martin Atkins
Browse files

configs/configupgrade: Use mock provider instead of test provider

The test provider comes with a lot of baggage since it's designed to be
used as a plugin, so instead we'll just use the mock provider
implementation directly, and so we can (in a later commit) configure it
appropriately for what our tests need here.
parent 6e0e8066
Showing with 3 additions and 2 deletions
+3 -2
...@@ -9,8 +9,8 @@ import ( ...@@ -9,8 +9,8 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
testprovider "github.com/hashicorp/terraform/builtin/providers/test"
"github.com/hashicorp/terraform/providers" "github.com/hashicorp/terraform/providers"
"github.com/hashicorp/terraform/terraform"
) )
func TestUpgradeValid(t *testing.T) { func TestUpgradeValid(t *testing.T) {
...@@ -178,6 +178,7 @@ func diffSourceFilesFallback(got, want []byte) []byte { ...@@ -178,6 +178,7 @@ func diffSourceFilesFallback(got, want []byte) []byte {
var testProviders = map[string]providers.Factory{ var testProviders = map[string]providers.Factory{
"test": providers.Factory(func() (providers.Interface, error) { "test": providers.Factory(func() (providers.Interface, error) {
return testprovider.Provider(), nil p := &terraform.MockProvider{}
return p, nil
}), }),
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment