command: fix push tests when running outside repo

VCS detection was on by default, and blows up when the tests are run in
a copy of the Terraform source that is not a git repository, like - say
- during a Homebrew formula install, just to pick a random example. :)
This commit is contained in:
Paul Hinze 2015-04-09 18:46:25 -05:00
parent d90b3aa332
commit a2cb77058c
1 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,7 @@ func TestPush_good(t *testing.T) {
} }
args := []string{ args := []string{
"-vcs=false",
testFixturePath("push"), testFixturePath("push"),
} }
if code := c.Run(args); code != 0 { if code := c.Run(args); code != 0 {
@ -107,6 +108,7 @@ func TestPush_input(t *testing.T) {
defaultInputWriter = new(bytes.Buffer) defaultInputWriter = new(bytes.Buffer)
args := []string{ args := []string{
"-vcs=false",
testFixturePath("push-input"), testFixturePath("push-input"),
} }
if code := c.Run(args); code != 0 { if code := c.Run(args); code != 0 {
@ -161,6 +163,7 @@ func TestPush_inputPartial(t *testing.T) {
defaultInputWriter = new(bytes.Buffer) defaultInputWriter = new(bytes.Buffer)
args := []string{ args := []string{
"-vcs=false",
testFixturePath("push-input-partial"), testFixturePath("push-input-partial"),
} }
if code := c.Run(args); code != 0 { if code := c.Run(args); code != 0 {
@ -215,6 +218,7 @@ func TestPush_inputTfvars(t *testing.T) {
path := testFixturePath("push-tfvars") path := testFixturePath("push-tfvars")
args := []string{ args := []string{
"-var-file", path + "/terraform.tfvars", "-var-file", path + "/terraform.tfvars",
"-vcs=false",
path, path,
} }
if code := c.Run(args); code != 0 { if code := c.Run(args); code != 0 {
@ -276,6 +280,7 @@ func TestPush_name(t *testing.T) {
args := []string{ args := []string{
"-name", "bar", "-name", "bar",
"-vcs=false",
testFixturePath("push"), testFixturePath("push"),
} }
if code := c.Run(args); code != 0 { if code := c.Run(args); code != 0 {