Skip to content

Commit 0e4dc91

Browse files
committed
Cross platform test assertion
1 parent 4e28129 commit 0e4dc91

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

rules/terraform_required_version_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ func Test_TerraformRequiredVersionRuleMultipleFiles(t *testing.T) {
109109

110110
t.Run("multiple files no terraform blocks", func(t *testing.T) {
111111
files := map[string]string{
112-
filepath.Join("modules", "foo", "bar", "other.tf"): "",
113-
filepath.Join("modules", "foo", "outputs.tf"): "",
114-
filepath.Join("modules", "foo", "main.tf"): "",
115-
filepath.Join("modules", "foo", "variables.tf"): "",
112+
filepath.FromSlash("modules/foo/bar/other.tf"): "",
113+
filepath.FromSlash("modules/foo/outputs.tf"): "",
114+
filepath.FromSlash("modules/foo/main.tf"): "",
115+
filepath.FromSlash("modules/foo/variables.tf"): "",
116116
}
117117
runner := helper.TestRunner(t, files)
118118
if err := rule.Check(runner); err != nil {
@@ -124,7 +124,7 @@ func Test_TerraformRequiredVersionRuleMultipleFiles(t *testing.T) {
124124
Rule: NewTerraformRequiredVersionRule(),
125125
Message: "terraform \"required_version\" attribute is required",
126126
Range: hcl.Range{
127-
Filename: "modules/foo/",
127+
Filename: filepath.FromSlash("modules/foo/"),
128128
},
129129
},
130130
}, runner.Issues)

0 commit comments

Comments
 (0)