test(docker): read persisted configuration as UTF-8 on Windows

This commit is contained in:
chengyongru authored and chengyongru committed 2026-10-19 13:02:26 +08:00
1 parent de8fbc3ad2
commit 3ab8082118
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -47,9 +47,9 @@ def test_custom_secrets_survive_json_serialization(tmp_path, secret):
def test_restart_preserves_user_settings_and_credentials(tmp_path):
path = tmp_path / "config.json"
assert _initialize(path, "original-web", "original-api").returncode == 0
data = json.loads(path.read_text())
data = json.loads(path.read_text(encoding="utf-8"))
data["providers"]["custom"] = {"apiKey": "provider-key", "apiBase": "http://model:8000/v1"}
path.write_text(json.dumps(data))
path.write_text(json.dumps(data), encoding="utf-8")
previous = path.read_bytes()
result = _initialize(path, "replacement-web", "replacement-api")
assert result.returncode == 0, result.stderr