feat(module): add PlanForce to Module interface with stubs

This commit is contained in:
MDietermann
2026-04-14 21:49:09 +02:00
parent e6e12ab5fd
commit d525646f3a
19 changed files with 96 additions and 0 deletions

View File

@@ -18,6 +18,9 @@ func (f fakeModule) Detect(context.Context) (module.State, error) { return nil,
func (f fakeModule) Plan(context.Context, module.State) (module.Plan, error) {
return module.Plan{}, nil
}
func (f fakeModule) PlanForce(context.Context) (module.Plan, error) {
return module.Plan{}, nil
}
func (f fakeModule) Apply(context.Context, module.Plan, module.Reporter) error { return nil }
func (f fakeModule) Verify(context.Context) error { return nil }

View File

@@ -119,6 +119,12 @@ func (c countingModule) Plan(context.Context, module.State) (module.Plan, error)
}
return module.Plan{}, nil
}
func (c countingModule) PlanForce(context.Context) (module.Plan, error) {
if c.onPlan != nil {
c.onPlan()
}
return module.Plan{}, nil
}
func (c countingModule) Apply(context.Context, module.Plan, module.Reporter) error { return nil }
func (c countingModule) Verify(context.Context) error { return nil }