mirror of https://github.com/hashicorp/terraform
Delete commands that are no longer in Terraform and have been removed for a full release cycle.pull/27798/head
parent
1ae3d30383
commit
08b649b6f9
@ -1,32 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
type ZeroTwelveUpgradeCommand struct {
|
||||
Meta
|
||||
}
|
||||
|
||||
func (c *ZeroTwelveUpgradeCommand) Run(args []string) int {
|
||||
c.Ui.Output(`
|
||||
The 0.12upgrade command has been removed. You must run this command with
|
||||
Terraform v0.12 to upgrade your configuration syntax before upgrading to the
|
||||
current version.`)
|
||||
return 0
|
||||
}
|
||||
|
||||
func (c *ZeroTwelveUpgradeCommand) Help() string {
|
||||
helpText := `
|
||||
Usage: terraform 0.12upgrade
|
||||
|
||||
The 0.12upgrade command has been removed. You must run this command with
|
||||
Terraform v0.12 to upgrade your configuration syntax before upgrading to
|
||||
the current version.
|
||||
`
|
||||
return strings.TrimSpace(helpText)
|
||||
}
|
||||
|
||||
func (c *ZeroTwelveUpgradeCommand) Synopsis() string {
|
||||
return "Rewrites pre-0.12 module source code for v0.12"
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// ZeroThirteenUpgradeCommand upgrades configuration files for a module
|
||||
// to include explicit provider source settings
|
||||
type ZeroThirteenUpgradeCommand struct {
|
||||
Meta
|
||||
}
|
||||
|
||||
func (c *ZeroThirteenUpgradeCommand) Run(args []string) int {
|
||||
c.Ui.Output(`
|
||||
The 0.13upgrade command has been removed. You must run this command with
|
||||
Terraform v0.13 to upgrade your provider requirements before upgrading to the
|
||||
current version.`)
|
||||
return 0
|
||||
}
|
||||
|
||||
func (c *ZeroThirteenUpgradeCommand) Help() string {
|
||||
helpText := `
|
||||
Usage: terraform 0.13upgrade
|
||||
|
||||
The 0.13upgrade command has been removed. You must run this command with
|
||||
Terraform v0.13 to upgrade your provider requirements before upgrading to
|
||||
the current version.
|
||||
`
|
||||
return strings.TrimSpace(helpText)
|
||||
}
|
||||
|
||||
func (c *ZeroThirteenUpgradeCommand) Synopsis() string {
|
||||
return "Rewrites pre-0.13 module source code for v0.13"
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/mitchellh/cli"
|
||||
)
|
||||
|
||||
func TestZeroThirteenUpgrade(t *testing.T) {
|
||||
ui := new(cli.MockUi)
|
||||
c := &ZeroThirteenUpgradeCommand{
|
||||
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.13upgrade command has been removed.") {
|
||||
t.Fatal("unexpected output:", output)
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue