don't check outputs for legacy tests
The legacy tests never had to account for outputs in the plan. This path is not used outside of old builtin test provider, so just work around the output changes until we remove this completely.
This commit is contained in:
parent
5eca0788c6
commit
241765f0ab
|
@ -115,9 +115,17 @@ func testStep(opts terraform.ContextOpts, state *terraform.State, step TestStep)
|
||||||
if stepDiags.HasErrors() {
|
if stepDiags.HasErrors() {
|
||||||
return state, newOperationError("second follow-up plan", stepDiags)
|
return state, newOperationError("second follow-up plan", stepDiags)
|
||||||
}
|
}
|
||||||
empty := p.Changes.Empty()
|
empty := true
|
||||||
newState := p.State
|
newState := p.State
|
||||||
|
|
||||||
|
// the legacy tests never took outputs into account
|
||||||
|
for _, c := range p.Changes.Resources {
|
||||||
|
if c.Action != plans.NoOp {
|
||||||
|
empty = false
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !empty {
|
if !empty {
|
||||||
if step.ExpectNonEmptyPlan {
|
if step.ExpectNonEmptyPlan {
|
||||||
log.Printf("[INFO] Got non-empty plan, as expected:\n\n%s", legacyPlanComparisonString(newState, p.Changes))
|
log.Printf("[INFO] Got non-empty plan, as expected:\n\n%s", legacyPlanComparisonString(newState, p.Changes))
|
||||||
|
|
Loading…
Reference in New Issue