opentofu/terraform/ui_output_mock.go

17 lines
327 B
Go
Raw Normal View History

2014-10-04 11:00:07 -05:00
package terraform
// MockUIOutput is an implementation of UIOutput that can be used for tests.
type MockUIOutput struct {
2014-10-10 16:50:35 -05:00
OutputCalled bool
OutputMessage string
OutputFn func(string)
2014-10-04 11:00:07 -05:00
}
func (o *MockUIOutput) Output(v string) {
o.OutputCalled = true
2014-10-10 16:50:35 -05:00
o.OutputMessage = v
2014-10-04 11:11:51 -05:00
if o.OutputFn != nil {
2014-10-04 11:00:07 -05:00
o.OutputFn(v)
}
}