From 85aa8769db73d1194d811cc12679bba392bccee5 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 28 Sep 2018 16:37:50 -0700 Subject: [PATCH] configs/configupgrade: Partially fix TestUpgradeValid This is still not compileable because the test provider needs to be updated to the new provider interface, but all the rest of the types are now correct so we can update the test provider in a later commit to make this work again. --- configs/configupgrade/upgrade_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configs/configupgrade/upgrade_test.go b/configs/configupgrade/upgrade_test.go index 01e2b23b7..ea985b11a 100644 --- a/configs/configupgrade/upgrade_test.go +++ b/configs/configupgrade/upgrade_test.go @@ -10,7 +10,7 @@ import ( "testing" testprovider "github.com/hashicorp/terraform/builtin/providers/test" - "github.com/hashicorp/terraform/terraform" + "github.com/hashicorp/terraform/providers" ) func TestUpgradeValid(t *testing.T) { @@ -32,7 +32,7 @@ func TestUpgradeValid(t *testing.T) { inputDir := filepath.Join(fixtureDir, entry.Name(), "input") wantDir := filepath.Join(fixtureDir, entry.Name(), "want") u := &Upgrader{ - Providers: terraform.ResourceProviderResolverFixed(testProviders), + Providers: providers.ResolverFixed(testProviders), } inputSrc, err := LoadModule(inputDir) @@ -90,7 +90,7 @@ func TestUpgradeRenameJSON(t *testing.T) { } u := &Upgrader{ - Providers: terraform.ResourceProviderResolverFixed(testProviders), + Providers: providers.ResolverFixed(testProviders), } gotSrc, diags := u.Upgrade(inputSrc) if diags.HasErrors() { @@ -176,8 +176,8 @@ func diffSourceFilesFallback(got, want []byte) []byte { return buf.Bytes() } -var testProviders = map[string]terraform.ResourceProviderFactory{ - "test": terraform.ResourceProviderFactory(func() (terraform.ResourceProvider, error) { +var testProviders = map[string]providers.Factory{ + "test": providers.Factory(func() (providers.Interface, error) { return testprovider.Provider(), nil }), }