Skip to content

Commit d150611

Browse files
author
Larry Hitchon
committed
add test to make sure built-in rules can be loaded
1 parent fa7d283 commit d150611

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

cli/app_test.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package main
2+
3+
import (
4+
"testing"
5+
)
6+
7+
func TestLoadTerraformRules(t *testing.T) {
8+
_, err := loadBuiltInRuleSet("assets/terraform.yml")
9+
if err != nil {
10+
t.Errorf("Cannot load built-in Terraform rules")
11+
}
12+
}
13+
14+
func TestLoadValidateRules(t *testing.T) {
15+
_, err := loadBuiltInRuleSet("assets/lint-rules.yml")
16+
if err != nil {
17+
t.Errorf("Cannot load built-in rules for -validate option")
18+
}
19+
}

0 commit comments

Comments
 (0)