@@ -185,6 +185,11 @@ func TestOpenVSCode_NoAgentDirectory(t *testing.T) {
185
185
wd ,err := os .Getwd ()
186
186
require .NoError (t ,err )
187
187
188
+ absPath := "/home/coder"
189
+ if runtime .GOOS == "windows" {
190
+ absPath = "C:\\ home\\ coder"
191
+ }
192
+
188
193
tests := []struct {
189
194
name string
190
195
args []string
@@ -205,7 +210,7 @@ func TestOpenVSCode_NoAgentDirectory(t *testing.T) {
205
210
},
206
211
{
207
212
name :"ok with absolute path" ,
208
- args : []string {"--test.open-error" ,workspace .Name ,"/home/coder" },
213
+ args : []string {"--test.open-error" ,workspace .Name ,absPath },
209
214
wantDir :"/home/coder" ,
210
215
},
211
216
{
@@ -508,11 +513,6 @@ func TestOpenVSCodeDevContainer_NoAgentDirectory(t *testing.T) {
508
513
wd ,err := os .Getwd ()
509
514
require .NoError (t ,err )
510
515
511
- absPath := "/home/coder"
512
- if runtime .GOOS == "windows" {
513
- absPath = "C:\\ home\\ coder"
514
- }
515
-
516
516
tests := []struct {
517
517
name string
518
518
env map [string ]string
@@ -533,8 +533,8 @@ func TestOpenVSCodeDevContainer_NoAgentDirectory(t *testing.T) {
533
533
},
534
534
{
535
535
name :"ok with absolute path" ,
536
- args : []string {"--test.open-error" ,workspace .Name ,"--container" ,containerName ,absPath },
537
- wantDir :absPath ,
536
+ args : []string {"--test.open-error" ,workspace .Name ,"--container" ,containerName ,"/home/coder" },
537
+ wantDir :"/home/coder" ,
538
538
},
539
539
{
540
540
name :"ok with token" ,