chore: [workflow] 提交工作区代码
This commit is contained in:
1 parent
2ff588a65d
commit
01f3d7aaf7
131 files changed
+24306
-1320
No files matched your search
@@ -23,7 +23,7 @@ def test_content_module_registers_only_scheduled_entries() -> None:
|
||||
|
||||
definitions = module.workflow_definitions()
|
||||
assert tuple(item.workflow_id for item in definitions) == CONTENT_WORKFLOW_IDS
|
||||
assert len(CONTENT_SCHEDULED_WORKFLOW_IDS) == 9
|
||||
assert len(CONTENT_SCHEDULED_WORKFLOW_IDS) == 10
|
||||
|
||||
|
||||
def test_content_workflows_use_project_owned_module_commands() -> None:
|
||||
@@ -46,9 +46,12 @@ def test_content_workflows_use_project_owned_module_commands() -> None:
|
||||
assert step.max_attempts == 1
|
||||
if definition.workflow_id == "content.comments.weekly":
|
||||
assert step.resources == (f"{CONTENT_RESOURCE}:{step.step_id}",)
|
||||
elif definition.workflow_id == "content.metrics.daily":
|
||||
elif definition.workflow_id in {
|
||||
"content.metrics.daily",
|
||||
"content.metrics.self_operated.daily",
|
||||
}:
|
||||
assert step.resources == (
|
||||
f"{CONTENT_RESOURCE}:content.metrics.daily:{step.step_id}",
|
||||
f"{CONTENT_RESOURCE}:{definition.workflow_id}:{step.step_id}",
|
||||
)
|
||||
else:
|
||||
assert step.resources == (CONTENT_RESOURCE,) == (
|
||||
@@ -68,9 +71,22 @@ def test_daily_content_steps_have_independent_resources() -> None:
|
||||
|
||||
assert {step.step_id for step in daily.steps} == {
|
||||
"collect_collaborators",
|
||||
"refresh_self_mapping",
|
||||
"collect_self_bilibili",
|
||||
"collect_self_douyin",
|
||||
"sync",
|
||||
}
|
||||
assert len({step.resources for step in daily.steps}) == len(daily.steps)
|
||||
|
||||
self_operated = next(
|
||||
item for item in module.workflow_definitions()
|
||||
if item.workflow_id == "content.metrics.self_operated.daily"
|
||||
)
|
||||
assert {step.step_id for step in self_operated.steps} == {
|
||||
"refresh_self_mapping",
|
||||
"collect_self_bilibili",
|
||||
"collect_self_douyin",
|
||||
"collect_self_xiaohongshu",
|
||||
"sync",
|
||||
"sync_self_video_metrics",
|
||||
}
|
||||
assert len({step.resources for step in self_operated.steps}) == len(
|
||||
self_operated.steps
|
||||
)
|
||||
Reference in new issue
Block a user