Skip to content

Commit f797b41

Browse files
committed
skip path separator tests on windows
1 parent 4676898 commit f797b41

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

agent/agentcontainers/devcontainer_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ func TestExtractAndInitializeDevcontainerScripts(t *testing.T) {
3131
args args
3232
wantFilteredScripts []codersdk.WorkspaceAgentScript
3333
wantDevcontainerScripts []codersdk.WorkspaceAgentScript
34+
35+
skipOnWindowsDueToPathSeparator bool
3436
}{
3537
{
3638
name: "no scripts",
@@ -143,6 +145,7 @@ func TestExtractAndInitializeDevcontainerScripts(t *testing.T) {
143145
RunOnStart: false,
144146
},
145147
},
148+
skipOnWindowsDueToPathSeparator: true,
146149
},
147150
{
148151
name: "scripts match devcontainers with expand path",
@@ -180,6 +183,7 @@ func TestExtractAndInitializeDevcontainerScripts(t *testing.T) {
180183
RunOnStart: false,
181184
},
182185
},
186+
skipOnWindowsDueToPathSeparator: true,
183187
},
184188
{
185189
name: "expand config path when ~",
@@ -221,11 +225,16 @@ func TestExtractAndInitializeDevcontainerScripts(t *testing.T) {
221225
RunOnStart: false,
222226
},
223227
},
228+
skipOnWindowsDueToPathSeparator: true,
224229
},
225230
}
226231
for _, tt := range tests {
227232
t.Run(tt.name, func(t *testing.T) {
228233
t.Parallel()
234+
if tt.skipOnWindowsDueToPathSeparator && filepath.Separator == '\\' {
235+
t.Skip("Skipping test on Windows due to path separator difference.")
236+
}
237+
229238
logger := slogtest.Make(t, nil)
230239
if tt.args.expandPath == nil {
231240
tt.args.expandPath = func(s string) (string, error) {

0 commit comments

Comments
 (0)