Skip to content

Conversation

@OhYee
Copy link
Member

@OhYee OhYee commented Jan 21, 2026

Add CustomSandbox implementation with corresponding template type and container configuration options including ACR instance ID, image registry type, and port settings. Update jest configuration to exclude sandbox subclasses that require network mocking and enhance test coverage for toolset and resource management components.

Added comprehensive unit tests for ToolSet authentication defaults, URL resolution, and resource lifecycle management including delete operations with callback handling.

新增自定义沙箱支持并增强测试覆盖率

添加 CustomSandbox 实现以及相应的模板类型和容器配置选项,包括 ACR 实例 ID、镜像注册表类型和端口设置。更新 jest 配置以排除需要网络模拟的沙箱子类,并为工具集和资源管理组件增强测试覆盖率。

为 ToolSet 认证默认值、URL 解析和资源生命周期管理(包括带回调处理的删除操作)添加全面的单元测试。

Change-Id: I21451c92388e17ef5d49afe554677b20b911e1c9

Thank you for creating a pull request to contribute to Serverless Devs agentrun-sdk-python code! Before you open the request please answer the following questions to help it be more easily integrated. Please check the boxes "[ ]" with "[x]" when done too.
Please select one of the PR types below to complete


Fix bugs

Bug detail

The specific manifestation of the bug or the associated issue.

Pull request tasks

  • Add test cases for the changes
  • Passed the CI test

Update docs

Reason for update

Why do you need to update your documentation?

Pull request tasks

  • Update Chinese documentation
  • Update English documentation

Add contributor

Contributed content

  • Code
  • Document

Content detail

if content_type == 'code' || content_type == 'document':
    please tell us `PR url`,like: https://github.com/Serverless-Devs/agentrun-sdk-python/pull/1
else:
    please describe your contribution in detail

Others

Reason for update

Why do you need to update your documentation?

OhYee added 3 commits January 21, 2026 11:24
Add CustomSandbox implementation with corresponding template type and container configuration options including ACR instance ID, image registry type, and port settings. Update jest configuration to exclude sandbox subclasses that require network mocking and enhance test coverage for toolset and resource management components.

Added comprehensive unit tests for ToolSet authentication defaults, URL resolution, and resource lifecycle management including delete operations with callback handling.

新增自定义沙箱支持并增强测试覆盖率

添加 CustomSandbox 实现以及相应的模板类型和容器配置选项,包括 ACR 实例 ID、镜像注册表类型和端口设置。更新 jest 配置以排除需要网络模拟的沙箱子类,并为工具集和资源管理组件增强测试覆盖率。

为 ToolSet 认证默认值、URL 解析和资源生命周期管理(包括带回调处理的删除操作)添加全面的单元测试。

Change-Id: I21451c92388e17ef5d49afe554677b20b911e1c9
Signed-off-by: OhYee <oyohyee@oyohyee.com>
…and error handling

The changes include updating the jest configuration to exclude complex sandbox files,
adding optional chaining in the client to prevent null reference errors, importing
necessary error types and APIs in the sandbox module, and completely refactoring
the test suites for both client and sandbox with better mocking strategies and
more comprehensive test cases covering various scenarios including network configurations
and error handling.

修复了客户端中的潜在空引用错误,并改进了沙箱和客户端的测试覆盖范围,增加了网络配置和错误处理的测试用例。

Change-Id: Ic7d89a41d3df8eb402142ee6e48fcd77bd3d6c90
Signed-off-by: OhYee <oyohyee@oyohyee.com>
Add Config initialization with accountId environment variable
to properly test default data endpoint behavior when not configured.

Updated the test case to include proper configuration setup
that was missing in the original test implementation.

test(sandbox): 更新自定义沙箱测试以包含配置初始化

添加 Config 初始化并设置 accountId 环境变量
以便在未配置时正确测试默认数据端点行为。

更新测试用例以包含适当的配置设置
这是原始测试实现中缺失的部分。

Change-Id: Ib7a3c632f6d5c669d476c4a2eccebf67b311258a
Signed-off-by: OhYee <oyohyee@oyohyee.com>
@OhYee OhYee merged commit 91f37f5 into main Jan 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants