Skip to content

Commit 342411c

Browse files
chore: fix oopsie on test
1 parent 21845a9 commit 342411c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

cli/open_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ func TestOpenVSCode_NoAgentDirectory(t *testing.T) {
185185
wd, err := os.Getwd()
186186
require.NoError(t, err)
187187

188+
absPath := "/home/coder"
189+
if runtime.GOOS == "windows" {
190+
absPath = "C:\\home\\coder"
191+
}
192+
188193
tests := []struct {
189194
name string
190195
args []string
@@ -205,7 +210,7 @@ func TestOpenVSCode_NoAgentDirectory(t *testing.T) {
205210
},
206211
{
207212
name: "ok with absolute path",
208-
args: []string{"--test.open-error", workspace.Name, "/home/coder"},
213+
args: []string{"--test.open-error", workspace.Name, absPath},
209214
wantDir: "/home/coder",
210215
},
211216
{
@@ -508,11 +513,6 @@ func TestOpenVSCodeDevContainer_NoAgentDirectory(t *testing.T) {
508513
wd, err := os.Getwd()
509514
require.NoError(t, err)
510515

511-
absPath := "/home/coder"
512-
if runtime.GOOS == "windows" {
513-
absPath = "C:\\home\\coder"
514-
}
515-
516516
tests := []struct {
517517
name string
518518
env map[string]string
@@ -533,8 +533,8 @@ func TestOpenVSCodeDevContainer_NoAgentDirectory(t *testing.T) {
533533
},
534534
{
535535
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",
538538
},
539539
{
540540
name: "ok with token",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy