Fix more tests
This commit is contained in:
parent
4fa395b03d
commit
9739ff0eed
|
@ -3040,7 +3040,7 @@ func TestExpectedUnneededCreate(t *testing.T) {
|
|||
p.Options.Plan = plan
|
||||
snap, res = TestOp(Update).Run(project, p.GetTarget(snap), p.Options, false, p.BackendClient, nil)
|
||||
assert.NotNil(t, snap)
|
||||
assert.NotNil(t, res)
|
||||
assert.Nil(t, res)
|
||||
|
||||
// Check resA and the provider are still listed in the snapshot
|
||||
if !assert.Len(t, snap.Resources, 2) {
|
||||
|
|
|
@ -316,7 +316,9 @@ func (sg *stepGenerator) generateSteps(event RegisterResourceEvent) ([]Step, res
|
|||
if sg.deployment.plan != nil {
|
||||
resourcePlan, ok := sg.deployment.plan[urn]
|
||||
if !ok {
|
||||
if err := checkMissingPlan(old, inputs, goal); err != nil {
|
||||
if old == nil {
|
||||
// We could error here, but we'll trigger an error later on anyway that Create isn't valid here
|
||||
} else if err := checkMissingPlan(old, inputs, goal); err != nil {
|
||||
return nil, result.FromError(fmt.Errorf("resource violates plan: %w", err))
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue