chore(deploy): build locale + deploy no-clone, rimuovi CI Gitea
- scripts/build-push.sh: replica job CI in locale (8 image, cache buildx, tag :latest + :sha-X) - scripts/deploy-noclone.sh: deploy VPS senza clone (curl raw config + image pull) - rimossa .gitea/workflows/ci.yml - README + DEPLOYMENT aggiornati: laptop -> registry -> VPS, paths /docker/cerbero_mcp - ruff fix su 3 test (I001, SIM117, UP037, F821) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,6 @@ import json
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from mcp_common.app_factory import ExchangeAppSpec, run_exchange_main
|
||||
from mcp_common.environment import EnvironmentInfo
|
||||
|
||||
@@ -109,9 +108,11 @@ def test_run_exchange_main_aborts_on_mainnet_without_confirmation(tmp_path, monk
|
||||
monkeypatch.delenv("STRICT_MAINNET", raising=False)
|
||||
|
||||
spec = _make_spec()
|
||||
with pytest.raises(EnvironmentMismatchError):
|
||||
with patch("mcp_common.app_factory.uvicorn.run"):
|
||||
run_exchange_main(spec)
|
||||
with (
|
||||
pytest.raises(EnvironmentMismatchError),
|
||||
patch("mcp_common.app_factory.uvicorn.run"),
|
||||
):
|
||||
run_exchange_main(spec)
|
||||
|
||||
|
||||
def test_run_exchange_main_strict_mainnet_disabled_via_env(tmp_path, monkeypatch):
|
||||
|
||||
@@ -100,6 +100,7 @@ def test_audit_write_op_no_principal(captured_records):
|
||||
def test_audit_write_op_writes_to_file_when_AUDIT_LOG_FILE_set(tmp_path, monkeypatch):
|
||||
"""Con env AUDIT_LOG_FILE settato, una riga JSON appare nel file."""
|
||||
import json
|
||||
|
||||
from mcp_common import audit as audit_mod
|
||||
|
||||
audit_file = tmp_path / "audit.jsonl"
|
||||
|
||||
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
from mcp_common.environment import (
|
||||
EnvironmentInfo,
|
||||
EnvironmentMismatchError,
|
||||
consistency_check,
|
||||
resolve_environment,
|
||||
@@ -123,9 +124,8 @@ def test_alpaca_paper_flag_key(monkeypatch):
|
||||
# ───────── consistency_check ─────────
|
||||
|
||||
|
||||
def _info(env: str, exchange: str = "deribit") -> "EnvironmentInfo":
|
||||
def _info(env: str, exchange: str = "deribit") -> EnvironmentInfo:
|
||||
"""Helper costruisce EnvironmentInfo per test."""
|
||||
from mcp_common.environment import EnvironmentInfo
|
||||
return EnvironmentInfo(
|
||||
exchange=exchange,
|
||||
environment=env,
|
||||
|
||||
Reference in New Issue
Block a user