mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
ReadResource is called during plan but not destroy
This commit is contained in:
parent
1fa3503acd
commit
ad5899d8bb
@ -96,10 +96,6 @@ func TestPlan_plan(t *testing.T) {
|
|||||||
if code := c.Run(args); code != 1 {
|
if code := c.Run(args); code != 1 {
|
||||||
t.Fatalf("wrong exit status %d; want 1\nstderr: %s", code, ui.ErrorWriter.String())
|
t.Fatalf("wrong exit status %d; want 1\nstderr: %s", code, ui.ErrorWriter.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.ReadResourceCalled {
|
|
||||||
t.Fatal("ReadResource should not have been called")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPlan_destroy(t *testing.T) {
|
func TestPlan_destroy(t *testing.T) {
|
||||||
@ -142,10 +138,6 @@ func TestPlan_destroy(t *testing.T) {
|
|||||||
t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
|
t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())
|
||||||
}
|
}
|
||||||
|
|
||||||
if !p.ReadResourceCalled {
|
|
||||||
t.Fatal("ReadResource should have been called")
|
|
||||||
}
|
|
||||||
|
|
||||||
plan := testReadPlan(t, outPath)
|
plan := testReadPlan(t, outPath)
|
||||||
for _, rc := range plan.Changes.Resources {
|
for _, rc := range plan.Changes.Resources {
|
||||||
if got, want := rc.Action, plans.Delete; got != want {
|
if got, want := rc.Action, plans.Delete; got != want {
|
||||||
|
Loading…
Reference in New Issue
Block a user