Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit896a296

Browse files
chore: fix oopsie on test
1 parent05bb621 commit896a296

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+
ifruntime.GOOS=="windows" {
190+
absPath="C:\\home\\coder"
191+
}
192+
188193
tests:= []struct {
189194
namestring
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-
ifruntime.GOOS=="windows" {
513-
absPath="C:\\home\\coder"
514-
}
515-
516516
tests:= []struct {
517517
namestring
518518
envmap[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)

[8]ページ先頭

©2009-2025 Movatter.jp