Isolate deployment recovery tests from the Docker daemon
This commit is contained in:
1 parent
fcd1cfc344
commit
d9af783ff2
2 files changed
+1
-2
No files matched your search
@@ -29,7 +29,6 @@ MACRO_SOURCES = ("fed", "bls", "bea")
|
||||
SYMBOLS = ("BTCUSDT", "ETHUSDT")
|
||||
# 发布所在分钟之后第几分钟的 1m 开盘价:发布后第 5 分钟进场(抓取加分析约 1–3 分钟),持有 1h、4h
|
||||
OFFSETS = {"open": 0, "entry": 5, "1h": 65, "4h": 245}
|
||||
LOOP_SECONDS = 60
|
||||
BATCH = 40
|
||||
CATEGORIES = {"price_report", "event", "irrelevant"}
|
||||
DIRECTIONS = {"bullish", "bearish", "neutral"}
|
||||
|
||||
@@ -229,7 +229,7 @@ class RecoveryTests(unittest.TestCase):
|
||||
return '{}'
|
||||
with patch.object(deploy, 'INSTANCE', directory), patch.object(deploy, 'branch_head', return_value='a' * 40), \
|
||||
patch.object(deploy, 'validate_images'), patch.object(deploy, 'inspect_services', return_value=running), \
|
||||
patch.object(deploy, 'run', side_effect=command) as run:
|
||||
patch.object(deploy, 'run', side_effect=command) as run, patch.object(deploy.subprocess, 'run'):
|
||||
with self.assertRaisesRegex(RuntimeError, 'Analysis became active'):
|
||||
deploy.deploy({**previous, 'commit': 'a' * 40}, directory)
|
||||
self.assertFalse(any('stop' in call.args for call in run.call_args_list))
|
||||
|
||||
Reference in new issue
Block a user