aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go
diff options
context:
space:
mode:
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.go5
1 files changed, 5 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
index 7852bc4..d828c92 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/ui_output_mock.go
@@ -1,13 +1,18 @@
1package terraform 1package terraform
2 2
3import "sync"
4
3// MockUIOutput is an implementation of UIOutput that can be used for tests. 5// MockUIOutput is an implementation of UIOutput that can be used for tests.
4type MockUIOutput struct { 6type MockUIOutput struct {
7 sync.Mutex
5 OutputCalled bool 8 OutputCalled bool
6 OutputMessage string 9 OutputMessage string
7 OutputFn func(string) 10 OutputFn func(string)
8} 11}
9 12
10func (o *MockUIOutput) Output(v string) { 13func (o *MockUIOutput) Output(v string) {
14 o.Lock()
15 defer o.Unlock()
11 o.OutputCalled = true 16 o.OutputCalled = true
12 o.OutputMessage = v 17 o.OutputMessage = v
13 if o.OutputFn != nil { 18 if o.OutputFn != nil {