Skip to content

Commit 184317c

Browse files
committed
fix windows paths
1 parent 83f0c54 commit 184317c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

archive/data_source_archive_file_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,38 +97,38 @@ data "archive_file" "foo" {
9797
source_content_filename = "content.txt"
9898
output_path = "%s"
9999
}
100-
`, outputPath)
100+
`, filepath.ToSlash(outputPath))
101101
}
102102

103103
func testAccArchiveFileFileConfig(outputPath string) string {
104104
return fmt.Sprintf(`
105105
data "archive_file" "foo" {
106106
type = "zip"
107-
source_file = "%s"
107+
source_file = "test-fixtures/test-file.txt"
108108
output_path = "%s"
109109
}
110-
`, filepath.Join("test-fixtures", "test-file.txt"), outputPath)
110+
`, filepath.ToSlash(outputPath))
111111
}
112112

113113
func testAccArchiveFileDirConfig(outputPath string) string {
114114
return fmt.Sprintf(`
115115
data "archive_file" "foo" {
116116
type = "zip"
117-
source_dir = "%s"
117+
source_dir = "test-fixtures/test-dir"
118118
output_path = "%s"
119119
}
120-
`, filepath.Join("test-fixtures", "test-dir"), outputPath)
120+
`, filepath.ToSlash(outputPath))
121121
}
122122

123123
func testAccArchiveFileDirExcludesConfig(outputPath string) string {
124124
return fmt.Sprintf(`
125125
data "archive_file" "foo" {
126126
type = "zip"
127-
source_dir = "%s"
128-
excludes = ["%s"]
127+
source_dir = "test-fixtures/test-dir"
128+
excludes = ["test-fixtures/test-dir/file2.txt"]
129129
output_path = "%s"
130130
}
131-
`, filepath.Join("test-fixtures", "test-dir"), filepath.Join("test-fixtures", "test-dir", "file2.txt"), outputPath)
131+
`, filepath.ToSlash(outputPath))
132132
}
133133

134134
func testAccArchiveFileMultiConfig(outputPath string) string {
@@ -141,7 +141,7 @@ data "archive_file" "foo" {
141141
}
142142
output_path = "%s"
143143
}
144-
`, outputPath)
144+
`, filepath.ToSlash(outputPath))
145145
}
146146

147147
func testTempDir(t *testing.T) string {

0 commit comments

Comments
 (0)