mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
core: Fix test for NodeDestroyResource.DynamicExpand
Provider addresses are now required for ResourceState, and the string formatting is now different in the naming of destroy-deposed graph nodes.
This commit is contained in:
parent
26e820d829
commit
ce41553d56
@ -22,6 +22,7 @@ func TestNodeDestroyResourceDynamicExpand_deposedCount(t *testing.T) {
|
|||||||
ID: "foo",
|
ID: "foo",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Provider: "provider.aws",
|
||||||
},
|
},
|
||||||
"aws_instance.bar.1": &ResourceState{
|
"aws_instance.bar.1": &ResourceState{
|
||||||
Type: "aws_instance",
|
Type: "aws_instance",
|
||||||
@ -30,6 +31,7 @@ func TestNodeDestroyResourceDynamicExpand_deposedCount(t *testing.T) {
|
|||||||
ID: "bar",
|
ID: "bar",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Provider: "provider.aws",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -59,11 +61,11 @@ func TestNodeDestroyResourceDynamicExpand_deposedCount(t *testing.T) {
|
|||||||
t.Fatalf("err: %s", err)
|
t.Fatalf("err: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
actual := strings.TrimSpace(g.String())
|
got := strings.TrimSpace(g.String())
|
||||||
expected := strings.TrimSpace(`
|
want := strings.TrimSpace(`
|
||||||
aws_instance.bar.0 (deposed #0)
|
aws_instance.bar[0] (deposed #0)
|
||||||
`)
|
`)
|
||||||
if actual != expected {
|
if got != want {
|
||||||
t.Fatalf("bad:\n\n%s", actual)
|
t.Fatalf("wrong result\n\ngot:\n%s\n\nwant:\n%s", got, want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user