auto-sync: 2026-06-07 08:23:57
Deploy / ci (push) Waiting to run
Deploy / deploy (push) Blocked by required conditions
Deploy / notify-deploy-failure (push) Blocked by required conditions

This commit is contained in:
cfdaily
2026-06-07 08:23:57 +08:00
parent 0d7425b88c
commit 7e1bdec0b2
3 changed files with 100 additions and 20 deletions
+13
View File
@@ -2,6 +2,11 @@ import pytest
pytestmark = pytest.mark.e2e
skip_no_integration = pytest.mark.skipif(
not __import__("os").environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run E2E tests against real daemon",
)
"""v3.1 端到端测试 — 新增场景覆盖
覆盖 v3.1 新增功能:
@@ -169,6 +174,7 @@ def _patch_db_claimed_at(pid: str, tid: str, claimed_at: str):
@pytest.mark.integration
@pytest.mark.skipif(not os.environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run real agent tests")
@skip_no_integration
class TestE94BroadcastClaim:
"""E9-4: 无 assignee 任务 → 广播认领 → Agent 执行 → done"""
@@ -230,6 +236,7 @@ class TestE94BroadcastClaim:
@pytest.mark.integration
@pytest.mark.skipif(not os.environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run real agent tests")
@skip_no_integration
class TestE95PauseResume:
"""E9-5: 手动推状态到 working → paused → 恢复 → 验证 resumed_from"""
@@ -322,6 +329,7 @@ class TestE95PauseResume:
@pytest.mark.integration
@pytest.mark.skipif(not os.environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run real agent tests")
@skip_no_integration
class TestE96CancelledRestart:
"""E9-6: cancelled → pending(重新启动)→ Agent 执行 → done"""
@@ -388,6 +396,7 @@ class TestE96CancelledRestart:
@pytest.mark.integration
@pytest.mark.skipif(not os.environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run real agent tests")
@skip_no_integration
class TestE97ClaimedTimeout:
"""E9-7: claimed 超时 → pending (assignee 清空)"""
@@ -453,6 +462,7 @@ class TestE97ClaimedTimeout:
@pytest.mark.integration
@pytest.mark.skipif(not os.environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run real agent tests")
@skip_no_integration
class TestE98CacheHeaders:
"""E9-8: 验证 CachedStaticFiles 缓存头"""
@@ -524,6 +534,7 @@ class TestE98CacheHeaders:
@pytest.mark.integration
@pytest.mark.skipif(not os.environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run real agent tests")
@skip_no_integration
class TestE10cRetryChain:
"""E10c: failed → pending(手动重试)→ 广播 → 认领 → done"""
@@ -598,6 +609,7 @@ class TestE10cRetryChain:
@pytest.mark.integration
@pytest.mark.skipif(not os.environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run real agent tests")
@skip_no_integration
class TestE10dFullLifecycle:
"""E10d: 无 assignee → 广播认领 → claimed → working → review → done
@@ -690,6 +702,7 @@ class TestE10dFullLifecycle:
@pytest.mark.integration
@pytest.mark.skipif(not os.environ.get("RUN_INTEGRATION"),
reason="Set RUN_INTEGRATION=1 to run real agent tests")
@skip_no_integration
class TestE15PromptV3Broadcast:
"""E15: Prompt v3.0 广播认领三级响应 E2E