|
|
@@ -75,7 +75,7 @@ def test_load_from_old_style_env(monkeypatch, default_config):
|
|
|
monkeypatch.setenv('AGENT_MEMORY_ENABLED', 'True')
|
|
|
monkeypatch.setenv('DEFAULT_AGENT', 'PlannerAgent')
|
|
|
monkeypatch.setenv('WORKSPACE_BASE', '/opt/files/workspace')
|
|
|
- monkeypatch.setenv('SANDBOX_CONTAINER_IMAGE', 'custom_image')
|
|
|
+ monkeypatch.setenv('SANDBOX_BASE_CONTAINER_IMAGE', 'custom_image')
|
|
|
|
|
|
load_from_env(default_config, os.environ)
|
|
|
|
|
|
@@ -89,7 +89,7 @@ def test_load_from_old_style_env(monkeypatch, default_config):
|
|
|
assert (
|
|
|
default_config.workspace_mount_path_in_sandbox is not UndefinedString.UNDEFINED
|
|
|
)
|
|
|
- assert default_config.sandbox.container_image == 'custom_image'
|
|
|
+ assert default_config.sandbox.base_container_image == 'custom_image'
|
|
|
|
|
|
|
|
|
def test_load_from_new_style_toml(default_config, temp_toml_file):
|
|
|
@@ -178,7 +178,7 @@ memory_enabled = true
|
|
|
[core]
|
|
|
workspace_base = "/opt/files2/workspace"
|
|
|
sandbox_timeout = 500
|
|
|
-sandbox_container_image = "node:14"
|
|
|
+sandbox_base_container_image = "node:14"
|
|
|
sandbox_user_id = 1001
|
|
|
default_agent = "TestAgent"
|
|
|
"""
|
|
|
@@ -192,7 +192,7 @@ default_agent = "TestAgent"
|
|
|
assert default_config.get_agent_config().memory_enabled is True
|
|
|
assert default_config.workspace_base == '/opt/files2/workspace'
|
|
|
assert default_config.sandbox.timeout == 500
|
|
|
- assert default_config.sandbox.container_image == 'node:14'
|
|
|
+ assert default_config.sandbox.base_container_image == 'node:14'
|
|
|
assert default_config.sandbox.user_id == 1001
|
|
|
assert default_config.workspace_mount_path_in_sandbox == '/workspace'
|
|
|
|
|
|
@@ -200,7 +200,7 @@ default_agent = "TestAgent"
|
|
|
|
|
|
# app config doesn't have fields sandbox_*
|
|
|
assert not hasattr(default_config, 'sandbox_timeout')
|
|
|
- assert not hasattr(default_config, 'sandbox_container_image')
|
|
|
+ assert not hasattr(default_config, 'sandbox_base_container_image')
|
|
|
assert not hasattr(default_config, 'sandbox_user_id')
|
|
|
|
|
|
# after finalize_config, workspace_mount_path is set to the absolute path of workspace_base
|
|
|
@@ -319,7 +319,7 @@ model = "test-model"
|
|
|
|
|
|
[sandbox]
|
|
|
timeout = 1
|
|
|
-container_image = "custom_image"
|
|
|
+base_container_image = "custom_image"
|
|
|
user_id = 1001
|
|
|
"""
|
|
|
)
|
|
|
@@ -330,7 +330,7 @@ user_id = 1001
|
|
|
|
|
|
assert default_config.get_llm_config().model == 'test-model'
|
|
|
assert default_config.sandbox.timeout == 1
|
|
|
- assert default_config.sandbox.container_image == 'custom_image'
|
|
|
+ assert default_config.sandbox.base_container_image == 'custom_image'
|
|
|
assert default_config.sandbox.user_id == 1001
|
|
|
|
|
|
|
|
|
@@ -357,7 +357,7 @@ def test_defaults_dict_after_updates(default_config):
|
|
|
)
|
|
|
assert defaults_after_updates['sandbox']['timeout']['default'] == 120
|
|
|
assert (
|
|
|
- defaults_after_updates['sandbox']['container_image']['default']
|
|
|
+ defaults_after_updates['sandbox']['base_container_image']['default']
|
|
|
== 'nikolaik/python-nodejs:python3.11-nodejs22'
|
|
|
)
|
|
|
assert defaults_after_updates == initial_defaults
|