feat(schedule): 新增平台任务参数契约与动态选项支持
This commit is contained in:
1 parent
2ce1aca023
commit
8b5b0b49bf
76 files changed
+7103
-1203
No files matched your search
@@ -38,6 +38,7 @@ def test_internal_job_shipping_inventory_rpa_writes_trigger(client, app, tmp_pat
|
||||
db.session.commit()
|
||||
run_no = run.run_no
|
||||
task_id = task.id
|
||||
run_id = run.id
|
||||
|
||||
resp = client.post(
|
||||
"/api/internal/jobs/shipping-inventory-rpa",
|
||||
@@ -46,9 +47,20 @@ def test_internal_job_shipping_inventory_rpa_writes_trigger(client, app, tmp_pat
|
||||
)
|
||||
assert resp.status_code == 200
|
||||
body = resp.get_json()
|
||||
assert body["summary"]["success_count"] >= 1
|
||||
assert body["summary"]["success_count"] == 0
|
||||
assert body["summary"]["total_count"] >= 1
|
||||
assert body.get("awaiting_rpa_callback") is True
|
||||
assert list(trigger_dir.glob("inventory_export_batch_*.json"))
|
||||
|
||||
with app.app_context():
|
||||
from app import db
|
||||
|
||||
refreshed = db.session.get(ScheduleRun, run_id)
|
||||
assert refreshed is not None
|
||||
assert refreshed.status == "running"
|
||||
assert refreshed.finished_at is None
|
||||
assert (refreshed.response_summary_json or {}).get("awaiting_rpa") is True
|
||||
|
||||
|
||||
def test_internal_job_unknown_key_returns_404(client):
|
||||
"""未注册 job key 应返回 404。"""
|
||||
|
||||
Reference in new issue
Block a user