diff --git a/command/meta_test.go b/command/meta_test.go index ca53d13b82..51f3b49290 100644 --- a/command/meta_test.go +++ b/command/meta_test.go @@ -363,6 +363,15 @@ func TestMeta_process(t *testing.T) { if err != nil { t.Fatalf("err: %s", err) } + // Regular tfvars files will not be autoloaded + fileIgnored := "ignored.tfvars" + err = ioutil.WriteFile( + filepath.Join(d, fileIgnored), + []byte(""), + 0644) + if err != nil { + t.Fatalf("err: %s", err) + } m := new(Meta) args := []string{} @@ -371,6 +380,10 @@ func TestMeta_process(t *testing.T) { t.Fatalf("err: %s", err) } + if len(args) != 6 { + t.Fatalf("expected 6 args, got %v", args) + } + if args[0] != "-var-file-default" { t.Fatalf("expected %q, got %q", "-var-file-default", args[0]) }