make Changes.Empty() not count NoOps
This make the plan `Empty` concept more closely match the legacy diff behavior. Remove old unknown field from plan_test
This commit is contained in:
parent
103c160a47
commit
b738cdb19f
|
@ -32,7 +32,12 @@ func NewChanges() *Changes {
|
|||
}
|
||||
|
||||
func (c *Changes) Empty() bool {
|
||||
return (len(c.Resources) + len(c.Outputs)) == 0
|
||||
for _, res := range c.Resources {
|
||||
if res.Action != NoOp {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// ResourceInstance returns the planned change for the current object of the
|
||||
|
|
|
@ -13,7 +13,6 @@ func TestProviderAddrs(t *testing.T) {
|
|||
plan := &Plan{
|
||||
VariableValues: map[string]DynamicValue{},
|
||||
Changes: &Changes{
|
||||
RootOutputs: map[string]*OutputChangeSrc{},
|
||||
Resources: []*ResourceInstanceChangeSrc{
|
||||
{
|
||||
Addr: addrs.Resource{
|
||||
|
|
Loading…
Reference in New Issue