Fix up tests
This commit is contained in:
parent
69d81638f9
commit
f0ad8cffc7
|
@ -3305,7 +3305,7 @@ func TestPlannedPreviews(t *testing.T) {
|
|||
},
|
||||
})
|
||||
p.Options.Plan = ClonePlan(t, plan)
|
||||
validate := ExpectDiagMessage(t, "Expected resource operations for urn:pulumi:test::test::pkgA:m:typA::resA but none were seen.\n")
|
||||
validate := ExpectDiagMessage(t, "<{%reset%}>resource violates plan: properties changed: -baz, -foo, -zed<{%reset%}>\n")
|
||||
_, res = TestOp(Update).Plan(project, p.GetTarget(t, nil), p.Options, p.BackendClient, validate)
|
||||
assert.Nil(t, res)
|
||||
|
||||
|
|
|
@ -114,12 +114,12 @@ func (op TestOp) runWithContext(
|
|||
plan, _, res := op(info, ctx, opts, dryRun)
|
||||
contract.IgnoreClose(journal)
|
||||
|
||||
if dryRun {
|
||||
return plan, nil, res
|
||||
}
|
||||
if validate != nil {
|
||||
res = validate(project, target, journal.Entries(), firedEvents, res)
|
||||
}
|
||||
if dryRun {
|
||||
return plan, nil, res
|
||||
}
|
||||
|
||||
snap := journal.Snap(target.Snapshot)
|
||||
if res == nil && snap != nil {
|
||||
|
|
|
@ -277,7 +277,7 @@ func (ex *deploymentExecutor) Execute(callerCtx context.Context, opts Options, p
|
|||
|
||||
// Check that we did operations for everything expected in the plan. We mutate ResourcePlan.Ops as we run
|
||||
// so by the time we get here everything in the map should have an empty ops list (except for unneeded deletes)
|
||||
if ex.deployment.plan != nil {
|
||||
if res == nil && ex.deployment.plan != nil {
|
||||
for urn, resourcePlan := range ex.deployment.plan.ResourcePlans {
|
||||
if len(resourcePlan.Ops) != 0 {
|
||||
if len(resourcePlan.Ops) == 1 && resourcePlan.Ops[0] == OpDelete {
|
||||
|
|
Loading…
Reference in a new issue