diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go b/vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go new file mode 100644 index 0000000..7852bc4 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go | |||
@@ -0,0 +1,16 @@ | |||
1 | package terraform | ||
2 | |||
3 | // MockUIOutput is an implementation of UIOutput that can be used for tests. | ||
4 | type MockUIOutput struct { | ||
5 | OutputCalled bool | ||
6 | OutputMessage string | ||
7 | OutputFn func(string) | ||
8 | } | ||
9 | |||
10 | func (o *MockUIOutput) Output(v string) { | ||
11 | o.OutputCalled = true | ||
12 | o.OutputMessage = v | ||
13 | if o.OutputFn != nil { | ||
14 | o.OutputFn(v) | ||
15 | } | ||
16 | } | ||