From 4fdb6d1b52fca72e4a4d5207220e0edd7c58a87b Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 15 Sep 2014 09:41:00 -0700 Subject: [PATCH] config: add test for empty file --- config/loader_test.go | 11 +++++++++++ config/test-fixtures/empty.tf | 0 2 files changed, 11 insertions(+) create mode 100644 config/test-fixtures/empty.tf diff --git a/config/loader_test.go b/config/loader_test.go index 320d1ea064..a07d506a84 100644 --- a/config/loader_test.go +++ b/config/loader_test.go @@ -50,6 +50,17 @@ func TestLoadBasic(t *testing.T) { } } +func TestLoadBasic_empty(t *testing.T) { + c, err := Load(filepath.Join(fixtureDir, "empty.tf")) + if err != nil { + t.Fatalf("err: %s", err) + } + + if c == nil { + t.Fatal("config should not be nil") + } +} + func TestLoadBasic_import(t *testing.T) { // Skip because we disabled importing t.Skip() diff --git a/config/test-fixtures/empty.tf b/config/test-fixtures/empty.tf new file mode 100644 index 0000000000..e69de29bb2