Skip to content

Commit 4e28129

Browse files
committed
Use cross-platform filepath.Join for test case
1 parent 5874361 commit 4e28129

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

rules/terraform_required_version_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package rules
22

33
import (
4+
"path/filepath"
45
"testing"
56

67
"github.com/hashicorp/hcl/v2"
@@ -108,10 +109,10 @@ func Test_TerraformRequiredVersionRuleMultipleFiles(t *testing.T) {
108109

109110
t.Run("multiple files no terraform blocks", func(t *testing.T) {
110111
files := map[string]string{
111-
"modules/foo/bar/other.tf": "",
112-
"modules/foo/outputs.tf": "",
113-
"modules/foo/main.tf": "",
114-
"modules/foo/variables.tf": "",
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"): "",
115116
}
116117
runner := helper.TestRunner(t, files)
117118
if err := rule.Check(runner); err != nil {

0 commit comments

Comments
 (0)