removing extraneous code

This commit is contained in:
= 2017-04-19 09:18:30 -06:00
parent 4a782583b6
commit 6bc3610c09
1 changed files with 4 additions and 10 deletions

View File

@ -354,21 +354,15 @@ func Test(t TestT, c TestCase) {
// Any errors are stored so that they can be returned by the factory in
// terraform to match non-test behavior.
func testProviderFactories(c TestCase) (map[string]terraform.ResourceProviderFactory, error) {
ctxProviders := make(map[string]terraform.ResourceProviderFactory)
ctxProviders := c.ProviderFactories // make(map[string]terraform.ResourceProviderFactory)
if ctxProviders == nil {
ctxProviders = make(map[string]terraform.ResourceProviderFactory)
}
// add any fixed providers
for k, p := range c.Providers {
ctxProviders[k] = terraform.ResourceProviderFactoryFixed(p)
}
// call any factory functions and store the result.
for k, pf := range c.ProviderFactories {
p, err := pf()
ctxProviders[k] = func() (terraform.ResourceProvider, error) {
return p, err
}
}
// reset the providers if needed
for k, pf := range ctxProviders {
// we can ignore any errors here, if we don't have a provider to reset