core: Improve fail output for TestContext2Apply_destroyComputed
More detailed diagnostics log makes it easier to see what's failing.
This commit is contained in:
parent
14524600b1
commit
d574a86d41
|
@ -1228,13 +1228,15 @@ func TestContext2Apply_destroyComputed(t *testing.T) {
|
|||
})
|
||||
|
||||
if p, diags := ctx.Plan(); diags.HasErrors() {
|
||||
t.Fatalf("plan errors: %s", diags.Err())
|
||||
logDiagnostics(t, diags)
|
||||
t.Fatal("plan failed")
|
||||
} else {
|
||||
t.Logf("plan:\n\n%s", legacyDiffComparisonString(p.Changes))
|
||||
}
|
||||
|
||||
if _, diags := ctx.Apply(); diags.HasErrors() {
|
||||
t.Fatalf("apply errors: %s", diags.Err())
|
||||
logDiagnostics(t, diags)
|
||||
t.Fatal("apply failed")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue