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.
This commit is contained in:
Martin Atkins 2018-10-01 15:34:10 -07:00
parent 477ea0d360
commit 961056c08d
1 changed files with 3 additions and 2 deletions

View File

@ -9,8 +9,8 @@ import (
"path/filepath"
"testing"
testprovider "github.com/hashicorp/terraform/builtin/providers/test"
"github.com/hashicorp/terraform/providers"
"github.com/hashicorp/terraform/terraform"
)
func TestUpgradeValid(t *testing.T) {
@ -178,6 +178,7 @@ func diffSourceFilesFallback(got, want []byte) []byte {
var testProviders = map[string]providers.Factory{
"test": providers.Factory(func() (providers.Interface, error) {
return testprovider.Provider(), nil
p := &terraform.MockProvider{}
return p, nil
}),
}