Merge pull request #9027 from hashicorp/f-gh-9026

cli: move tests to use NewMockUi func.
This commit is contained in:
James Rasell
2020-10-06 08:28:18 +02:00
committed by GitHub
78 changed files with 188 additions and 188 deletions

View File

@@ -66,7 +66,7 @@ func TestCommand_Args(t *testing.T) {
for _, tc := range tcases {
// Make a new command. We preemptively close the shutdownCh
// so that the command exits immediately instead of blocking.
ui := new(cli.MockUi)
ui := cli.NewMockUi()
shutdownCh := make(chan struct{})
close(shutdownCh)
cmd := &Command{
@@ -120,7 +120,7 @@ func TestCommand_MetaConfigValidation(t *testing.T) {
// Make a new command. We preemptively close the shutdownCh
// so that the command exits immediately instead of blocking.
ui := new(cli.MockUi)
ui := cli.NewMockUi()
shutdownCh := make(chan struct{})
close(shutdownCh)
cmd := &Command{