From 961056c08d7c7735203aea7ac699dab0086798f6 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 1 Oct 2018 15:34:10 -0700 Subject: [PATCH] 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. --- configs/configupgrade/upgrade_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configs/configupgrade/upgrade_test.go b/configs/configupgrade/upgrade_test.go index ea985b11a..c510c9bef 100644 --- a/configs/configupgrade/upgrade_test.go +++ b/configs/configupgrade/upgrade_test.go @@ -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 }), }