Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion adk/backend/agentkit/code_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ try:
with os.scandir(path) as it:
for entry in sorted(it, key=lambda e: e.name):
result = {{
'path': entry.name,
'path': os.path.join(path, entry.name),
'is_dir': entry.is_dir(follow_symlinks=False)
}}
print(json.dumps(result))
Expand Down
6 changes: 3 additions & 3 deletions adk/backend/agentkit/sandbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/stretchr/testify/require"
)

// TestNewArkSandbox tests the constructor for ArkSandbox.
func TestNewArkSandbox(t *testing.T) {
// TestNewSandboxToolSandbox tests the constructor for ArkSandbox.
func TestNewSandboxToolSandbox(t *testing.T) {
t.Run("Success: ValidConfig", func(t *testing.T) {
config := &Config{
AccessKeyID: "test-ak",
Expand Down Expand Up @@ -176,7 +176,7 @@ func createMockResponse(t *testing.T, success bool, outputText, eName, eValue st
return finalResBytes
}

func TestArkSandbox_FileSystemMethods(t *testing.T) {
func TestSandboxToolFileSystemMethods(t *testing.T) {
s, server := setupTest(t)
defer server.Close()

Expand Down
2 changes: 1 addition & 1 deletion adk/backend/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (s *backend) LsInfo(ctx context.Context, req *filesystem.LsInfoRequest) ([]
var files []filesystem.FileInfo
for _, entry := range entries {
files = append(files, filesystem.FileInfo{
Path: entry.Name(),
Path: filepath.Join(path, entry.Name()),
})
}

Expand Down
6 changes: 3 additions & 3 deletions adk/backend/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ func TestLsInfo(t *testing.T) {
files, err := s.LsInfo(ctx, req)
assert.NoError(t, err)
assert.Len(t, files, 2)
assert.Equal(t, "file1.txt", files[0].Path)
assert.Equal(t, "subdir", files[1].Path)
assert.Equal(t, filepath.Join(dir, "file1.txt"), files[0].Path)
assert.Equal(t, filepath.Join(dir, "subdir"), files[1].Path)
})

t.Run("list non-existent directory", func(t *testing.T) {
Expand Down Expand Up @@ -442,7 +442,7 @@ func TestPathCleaning(t *testing.T) {
// Should find test.txt and write_test.txt
found := false
for _, f := range files {
if f.Path == filename {
if f.Path == filepath.Join(dir, filename) {
found = true
break
}
Expand Down
Loading