builtin/providers/test: use new API for root module address

terraform.RootModulePath is no longer present, but
addrs.RootModuleInstance is equivalent to it.
This commit is contained in:
Martin Atkins 2018-10-01 16:11:50 -07:00
parent 961056c08d
commit d11dd20bf3
1 changed files with 2 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import (
"strings"
"testing"
"github.com/hashicorp/terraform/addrs"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
)
@ -464,7 +465,7 @@ output "value_from_map_from_list" {
`),
ExpectError: nil,
Check: func(s *terraform.State) error {
root := s.ModuleByPath(terraform.RootModulePath)
root := s.ModuleByPath(addrs.RootModuleInstance)
mapOut := root.Outputs["map_from_list"].Value
expectedMapOut := map[string]interface{}{
"a": "1",