Skip to content

Commit 243f451

Browse files
committed
old fields shouldn't be in the app dataclass
1 parent a35e5b7 commit 243f451

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/unit/test_config.py

+9
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ def test_load_from_new_style_toml(default_config, temp_toml_file):
125125
assert default_config.sandbox.box_type == 'local'
126126
assert default_config.sandbox.timeout == 1
127127

128+
# default config doesn't have a field sandbox_type
129+
assert not hasattr(default_config, 'sandbox_type')
130+
128131
# before finalize_config, workspace_mount_path is UndefinedString.UNDEFINED if it was not set
129132
assert default_config.workspace_mount_path is UndefinedString.UNDEFINED
130133
assert (
@@ -175,6 +178,12 @@ def test_compat_load_sandbox_from_toml(default_config, temp_toml_file):
175178

176179
finalize_config(default_config)
177180

181+
# app config doesn't have fields sandbox_*
182+
assert not hasattr(default_config, 'sandbox_type')
183+
assert not hasattr(default_config, 'sandbox_timeout')
184+
assert not hasattr(default_config, 'sandbox_container_image')
185+
assert not hasattr(default_config, 'sandbox_user_id')
186+
178187
# after finalize_config, workspace_mount_path is set to the absolute path of workspace_base
179188
# if it was undefined
180189
assert default_config.workspace_mount_path == '/opt/files2/workspace'

0 commit comments

Comments
 (0)