From 38cb98fb0c9a99e02f08592c75775dec2fa73eca Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Mon, 14 Aug 2017 17:19:40 +0200 Subject: [PATCH] Comply w/ latest changes in mitchellh/cli --- command/hook_ui_test.go | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/command/hook_ui_test.go b/command/hook_ui_test.go index 2ffa40abf..db2171b17 100644 --- a/command/hook_ui_test.go +++ b/command/hook_ui_test.go @@ -1,7 +1,6 @@ package command import ( - "bytes" "fmt" "testing" "time" @@ -12,11 +11,7 @@ import ( ) func TestUiHookPreApply_periodicTimer(t *testing.T) { - ui := &cli.MockUi{ - InputReader: bytes.NewReader([]byte{}), - ErrorWriter: bytes.NewBuffer([]byte{}), - OutputWriter: bytes.NewBuffer([]byte{}), - } + ui := cli.NewMockUi() h := &UiHook{ Colorize: &colorstring.Colorize{ Colors: colorstring.DefaultColors, @@ -88,11 +83,7 @@ data.aws_availability_zones.available: Still destroying... (ID: 2017-03-05 10:56 } func TestUiHookPreApply_destroy(t *testing.T) { - ui := &cli.MockUi{ - InputReader: bytes.NewReader([]byte{}), - ErrorWriter: bytes.NewBuffer([]byte{}), - OutputWriter: bytes.NewBuffer([]byte{}), - } + ui := cli.NewMockUi() h := &UiHook{ Colorize: &colorstring.Colorize{ Colors: colorstring.DefaultColors, @@ -152,11 +143,7 @@ func TestUiHookPreApply_destroy(t *testing.T) { } func TestUiHookPostApply_emptyState(t *testing.T) { - ui := &cli.MockUi{ - InputReader: bytes.NewReader([]byte{}), - ErrorWriter: bytes.NewBuffer([]byte{}), - OutputWriter: bytes.NewBuffer([]byte{}), - } + ui := cli.NewMockUi() h := &UiHook{ Colorize: &colorstring.Colorize{ Colors: colorstring.DefaultColors,