dify/api/tests/unit_tests/core
Harry a0c388f283 refactor(sandbox): extract connection helpers and move run_command to helper module
- Add helpers.py with connection management utilities:
    - with_connection: context manager for connection lifecycle
    - submit_command: execute command and return CommandFuture
    - execute: run command with auto connection, raise on failure
    - try_execute: run command with auto connection, return result

  - Add CommandExecutionError to exec.py for typed error handling
    with access to exit_code, stderr, and full result

  - Remove run_command method from VirtualEnvironment base class
    (now available as submit_command helper)

  - Update all call sites to use new helper functions:
    - sandbox/session.py
    - sandbox/storage/archive_storage.py
    - sandbox/bash/bash_tool.py
    - workflow/nodes/command/node.py

  - Add comprehensive unit tests for helpers with connection reuse
2026-01-15 00:13:52 +08:00
..
agent [autofix.ci] apply automated fixes 2025-12-30 02:23:25 +00:00
app refactor(sandbox): reorganize sandbox-related imports and rename SandboxFactory to VMFactory for clarity 2026-01-12 02:07:31 +08:00
datasource fix: handle missing credential_id (#30051) 2025-12-24 11:21:51 +08:00
file
helper feat(refactoring): Support Structured Logging (JSON) (#30170) 2026-01-04 11:46:46 +08:00
logging feat(refactoring): Support Structured Logging (JSON) (#30170) 2026-01-04 11:46:46 +08:00
mcp feat: implement RFC-compliant OAuth discovery with dynamic scope selection for MCP providers (#28294) 2025-11-20 11:18:16 +08:00
model_runtime
moderation Feat/ implement test script of content moderation (#28923) 2025-11-30 12:43:58 +08:00
ops fix(ops): correct LangSmith dotted_order timestamp format (#30022) 2025-12-23 19:00:17 +08:00
plugin feat: complete test script of plugin manager (#28967) 2025-12-02 11:25:08 +08:00
prompt
rag fix: correct docx hyperlink extraction (#30360) 2026-01-06 11:24:26 +08:00
repositories
schemas
tools fix: fix instance is not bind to session (#30913) 2026-01-13 21:15:21 +08:00
variables refactor(variables): clarify base vs union type naming (#30634) 2026-01-13 23:39:34 +09:00
virtual_environment refactor(sandbox): extract connection helpers and move run_command to helper module 2026-01-15 00:13:52 +08:00
workflow Merge remote-tracking branch 'origin/main' into feat/support-agent-sandbox 2026-01-14 09:54:07 +08:00
__init__.py
test_file.py
test_model_manager.py
test_provider_configuration.py chore: remove icon_large of models (#30466) 2026-01-03 02:35:17 +09:00
test_provider_manager.py more typed orm (#28519) 2025-11-24 10:50:20 +08:00
test_trigger_debug_event_selectors.py