Skip to content

Commit e7ae741

Browse files
author
flynnzzhang
committed
ut update
1 parent 118a1ff commit e7ae741

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

ut/test.py

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3946,28 +3946,6 @@ def test_ci_list_workflowexecution():
39463946
assert response
39473947

39483948

3949-
def test_ci_trigger_workflow():
3950-
# 触发工作流接口
3951-
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
3952-
response = client.ci_trigger_workflow(
3953-
Bucket=ci_bucket_name,
3954-
WorkflowId='w5307ee7a60d6489383c3921c715dd1c5',
3955-
Key=ci_test_image,
3956-
**kwargs
3957-
)
3958-
assert response
3959-
print(response)
3960-
instance_id = response['InstanceId']
3961-
# 查询工作流实例接口
3962-
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
3963-
response = client.ci_get_workflowexecution(
3964-
Bucket=ci_bucket_name,
3965-
RunId=instance_id,
3966-
**kwargs
3967-
)
3968-
assert response
3969-
3970-
39713949
def test_ci_get_media_transcode_jobs():
39723950
# 转码任务详情
39733951
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
@@ -4770,6 +4748,8 @@ def test_ci_workflow():
47704748
)
47714749
assert response['MediaWorkflow']['State'] == 'Paused'
47724750

4751+
ci_trigger_workflow(workflow_id)
4752+
47734753
response = client.ci_delete_workflow(
47744754
Bucket=ci_bucket_name, # 桶名称
47754755
WorkflowId=workflow_id, # 需要删除的工作流ID
@@ -4778,6 +4758,27 @@ def test_ci_workflow():
47784758
print(response)
47794759
assert response['WorkflowId'] == workflow_id
47804760

4761+
def ci_trigger_workflow(workflow_id):
4762+
# 触发工作流接口
4763+
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
4764+
response = client.ci_trigger_workflow(
4765+
Bucket=ci_bucket_name,
4766+
WorkflowId=workflow_id,
4767+
Key=ci_test_image,
4768+
**kwargs
4769+
)
4770+
assert response
4771+
print(response)
4772+
instance_id = response['InstanceId']
4773+
# 查询工作流实例接口
4774+
kwargs = {"CacheControl": "no-cache", "ResponseCacheControl": "no-cache"}
4775+
response = client.ci_get_workflowexecution(
4776+
Bucket=ci_bucket_name,
4777+
RunId=instance_id,
4778+
**kwargs
4779+
)
4780+
assert response
4781+
47814782

47824783
def test_ci_auditing_report_badcase():
47834784
if TEST_CI != 'true':

0 commit comments

Comments
 (0)