fix(T+): 补齐指导成本与读取服务保护
补充业务详情指导成本入口、来源版本和历史封存保护,接入月份锁并完善权限复核。 同步接入读取服务运行状态到页面,补充前端控制、回归测试和服务端只读连接授权校验。 定向隔离测试:89 项通过,1 条既有 Starlette 弃用警告。
This commit is contained in:
1 parent
68e70fd6e2
commit
b8920c0d28
17 files changed
+375
-47
No files matched your search
@@ -21,7 +21,10 @@ def script(monkeypatch):
|
||||
spec = importlib.util.spec_from_file_location("compatibility_script", path)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
settings = Settings(_env_file=None, app_secret_key="x" * 32, t_plus_encrypt=True)
|
||||
settings = Settings(
|
||||
_env_file=None, app_secret_key="x" * 32, t_plus_encrypt=True,
|
||||
t_plus_allow_dev_sa=False, t_plus_allow_admin_account=False,
|
||||
)
|
||||
monkeypatch.setattr(module, "get_settings", lambda: settings)
|
||||
return module
|
||||
|
||||
@@ -44,7 +47,7 @@ def test_脚本复用连接文件校验与加密设置(script, tmp_path):
|
||||
assert script.get_settings().t_plus_enabled is False
|
||||
payload["user"] = "sa"
|
||||
path.write_text(json.dumps(payload), encoding="utf-8")
|
||||
with pytest.raises(RuntimeError, match="专用只读"):
|
||||
with pytest.raises(RuntimeError, match="管理员账号未获授权"):
|
||||
script.compatibility_settings(path)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user