Skip to content

Commit c8f68fd

Browse files
committed
Adapt filepaths at TestUnit_PlanFile_OutputFile_JSONOutputFolder to work with Windows
Signed-off-by: Diogenes Fernandes <[email protected]>
1 parent 7fb050f commit c8f68fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/runner/common/unit_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ func TestUnit_PlanFile_OutputFile_JSONOutputFolder(t *testing.T) {
6565

6666
planFile := unit.PlanFile(l, opts)
6767
assert.NotEmpty(t, planFile)
68-
assert.Contains(t, planFile, "/out-folder/module/path/")
68+
assert.Contains(t, planFile, filepath.FromSlash("/out-folder/module/path/"))
6969
assert.True(t, hasSuffix(planFile, ".tfplan"), "planFile should end with .tfplan: %s", planFile)
7070

7171
outputFile := unit.OutputFile(l, opts)
7272
assert.NotEmpty(t, outputFile)
73-
assert.Contains(t, outputFile, "/out-folder/module/path/")
73+
assert.Contains(t, outputFile, filepath.FromSlash("/out-folder/module/path/"))
7474
assert.True(t, hasSuffix(outputFile, ".tfplan"), "outputFile should end with .tfplan: %s", outputFile)
7575

7676
jsonFile := unit.OutputJSONFile(l, opts)
7777
assert.NotEmpty(t, jsonFile)
78-
assert.Contains(t, jsonFile, "/json-folder/module/path/")
78+
assert.Contains(t, jsonFile, filepath.FromSlash("/json-folder/module/path/"))
7979
assert.True(t, hasSuffix(jsonFile, ".json"), "jsonFile should end with .json: %s", jsonFile)
8080
}
8181

0 commit comments

Comments
 (0)