From d1506115dac9e3b09e218ffd70c5d0e47a19f78e Mon Sep 17 00:00:00 2001 From: Larry Hitchon Date: Sat, 14 Apr 2018 15:56:43 -0700 Subject: [PATCH] add test to make sure built-in rules can be loaded --- cli/app_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cli/app_test.go diff --git a/cli/app_test.go b/cli/app_test.go new file mode 100644 index 0000000..8519e13 --- /dev/null +++ b/cli/app_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "testing" +) + +func TestLoadTerraformRules(t *testing.T) { + _, err := loadBuiltInRuleSet("assets/terraform.yml") + if err != nil { + t.Errorf("Cannot load built-in Terraform rules") + } +} + +func TestLoadValidateRules(t *testing.T) { + _, err := loadBuiltInRuleSet("assets/lint-rules.yml") + if err != nil { + t.Errorf("Cannot load built-in rules for -validate option") + } +}