You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/command/012_config_upgrade_test.go

27 lines
478 B

package command
import (
"strings"
"testing"
"github.com/mitchellh/cli"
)
func TestZeroTwelveUpgrade_deprecated(t *testing.T) {
ui := new(cli.MockUi)
c := &ZeroTwelveUpgradeCommand{
Meta: Meta{
Ui: ui,
},
}
if code := c.Run([]string{}); code != 0 {
t.Fatalf("bad: \n%s", ui.ErrorWriter.String())
}
output := ui.OutputWriter.String()
if !strings.Contains(output, "The 0.12upgrade command has been removed.") {
t.Fatal("unexpected output:", output)
}
}