Commit fb06282
Restore pre-binary testing ExpectNonEmptyPlan behavior.
TestSteps do a number of things: first they apply a config, then they
run some checks on that config, then they do a plan _without_
refreshing, then refresh, then do _another_ plan.
When you tell a TestStep you expect a non-empty plan, _right now_ it
expects _both_ those plans to come back empty. Pre-binary testing,
however, it only required the second one to come back non-empty.
This matters because some providers overload TestChecks to modify
resources out of band. When this is done, there's a plan without a
refresh (that won't see the modifications) and a plan after a refresh
(that will see the changes). If both are forced to agree on whether the
plan should be empty or not, you can't use that pattern anymore, because
they can't _both_ be right.
This restores the original behavior of allowing the first plan to be
non-empty _or_ empty when ExpectNonEmptyPlan is set to true (it must be
empty when ExpectNonEmptyPlan is false), but requiring the second plan,
after the refresh, to be non-empty when ExpectNonEmptyPlan is true.1 parent 8c571ee commit fb06282
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
146 | 144 | | |
147 | 145 | | |
148 | 146 | | |
| |||
0 commit comments