helper/resource: Fix import test harness, which was modifying state
Maps are reference types, it turns out :D
This commit is contained in:
parent
93832527b1
commit
614806d59f
|
@ -90,8 +90,14 @@ func testStepImportState(
|
|||
}
|
||||
|
||||
// Compare their attributes
|
||||
actual := r.Primary.Attributes
|
||||
expected := oldR.Primary.Attributes
|
||||
actual := make(map[string]string)
|
||||
for k, v := range r.Primary.Attributes {
|
||||
actual[k] = v
|
||||
}
|
||||
expected := make(map[string]string)
|
||||
for k, v := range oldR.Primary.Attributes {
|
||||
expected[k] = v
|
||||
}
|
||||
|
||||
// Remove fields we're ignoring
|
||||
for _, v := range step.ImportStateVerifyIgnore {
|
||||
|
|
Loading…
Reference in New Issue