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

Commitc31768d

Browse files
authored
fix: use filepath to construct mcp test write path (#19808)
Hopefullyfixescoder/internal#993``` file path must be absolute: "/test/some/path"```Not sure if this is the right fix though, since I am not sure how thisonly flakes rather than always failing. It looks like starting with `/`should not be considered absolute in Windows, but then how did it everpass at all?
1 parent18b0aca commitc31768d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎codersdk/toolsdk/toolsdk_test.go‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,14 +615,17 @@ func TestTools(t *testing.T) {
615615
tb,err:=toolsdk.NewDeps(client)
616616
require.NoError(t,err)
617617

618+
tmpdir:=os.TempDir()
619+
filePath:=filepath.Join(tmpdir,"write")
620+
618621
_,err=testTool(t,toolsdk.WorkspaceWriteFile,tb, toolsdk.WorkspaceWriteFileArgs{
619622
Workspace:workspace.Name,
620-
Path:"/test/some/path",
623+
Path:filePath,
621624
Content: []byte("content"),
622625
})
623626
require.NoError(t,err)
624627

625-
b,err:=afero.ReadFile(fs,"/test/some/path")
628+
b,err:=afero.ReadFile(fs,filePath)
626629
require.NoError(t,err)
627630
require.Equal(t, []byte("content"),b)
628631
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp