command: fix panic in TestStatePush_lineageMismatch

This test is currently failing due to the command completing successfully,
which would previously cause a panic because we didn't properly initialize
the MockUi and so its error buffer is nil unless written to.

(The failure this was masking will be fixed in a subsequent commit.)
This commit is contained in:
Martin Atkins 2018-11-09 15:16:20 -08:00
parent 544c2932ce
commit ced06a4ca3
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ func TestStatePush_lineageMismatch(t *testing.T) {
expected := testStateRead(t, "local-state.tfstate")
p := testProvider()
ui := new(cli.MockUi)
ui := cli.NewMockUi()
c := &StatePushCommand{
Meta: Meta{
testingOverrides: metaOverridesForProvider(p),