新增和更新用例
This commit is contained in:
@@ -28,7 +28,7 @@ case_info:
|
||||
description: ${generate_words()} # 组织描述
|
||||
location: ${generate_city(lan='zh', full=False)} # 组织地区
|
||||
repo_admin_change_team_access: true # 项目管理员可以添加或移除团队的访问权限
|
||||
image: data:image/png;base64,${get_file_content('gitlinklogo3.jpg')} # 组织图片, base64编码方式
|
||||
image: data:image/png;base64,${get_file_content('gitlinklogo3.jpg')} # 组织图片, 二进制
|
||||
visibility: common # 组织可见性,默认值common
|
||||
files:
|
||||
assert_response:
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- repo
|
||||
- dataset
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库已经创建数据集
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_get_repo_licenses_01
|
||||
- gitlink_projects_new_project_01
|
||||
- gitlink_repo_new_dataset_02
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_edit_dataset_01
|
||||
title: 编辑数据集,编辑成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: PUT
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: test_${generate_identifier()}_${generate_identifier()}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
paper_content: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- repo
|
||||
- dataset
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库已经创建数据集
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
- gitlink_repo_new_dataset_02
|
||||
- gitlink_repo_get_dataset_detail_01
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_get_dataset_detail_01
|
||||
title: 获取数据集详情
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
page: 1
|
||||
limit: 10
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
expect_value: attachment_total_count
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
dataset_container_id: $.id
|
||||
case_dependence:
|
||||
@@ -0,0 +1,208 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- repo
|
||||
- dataset
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库开启了数据集功能
|
||||
# 每一个仓库仅能存在一个数据集,因此每次测试都必须新建项目,创建数据集,最后清理数据:删除项目;
|
||||
# 新建数据集时,数据集名称和数据集描述是必填项。其他为非必填。
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface: gitlink_get_repo_licenses_01
|
||||
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_new_dataset_01
|
||||
title: 项目创建数据集(所有参数均填写),创建成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: test_${generate_identifier()}_${generate_identifier()}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
paper_content: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_dataset_02
|
||||
title: 项目创建数据集(仅填写必填项),创建成功
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: test_${generate_identifier()}_${generate_identifier()}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: success
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: 0
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_dataset_03
|
||||
title: 项目创建数据集,数据集名称长度101,创建失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: ${faker.pystr(max_chars=101)}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
paper_content: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: '验证失败: Title过长(最长为 100 个字符)'
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: -1
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_dataset_04
|
||||
title: 项目创建数据集,数据集描述长度501,创建失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: ${generate_words()}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${faker.pystr(max_chars=501)}
|
||||
paper_content: ${generate_paragraph(nb=5)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: '验证失败: Description过长(最长为 500 个字符)'
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: -1
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
-
|
||||
id: gitlink_repo_new_dataset_05
|
||||
title: 项目创建数据集,对应研究论文长度501,创建失败
|
||||
severity: critical
|
||||
run: True
|
||||
url: /api/v1/${repo_owner}/${repo_identifier}/dataset.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
title: ${generate_words()}
|
||||
license_id: ${random.choice(${licenses_ids})}
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
paper_content: ${faker.pystr(max_chars=501)}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
type_jsonpath: $.message
|
||||
expect_value: '验证失败: Paper content过长(最长为 500 个字符)'
|
||||
assert_type: ==
|
||||
assertStatus:
|
||||
type_jsonpath: $.status
|
||||
expect_value: -1
|
||||
assert_type: ==
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
@@ -0,0 +1,52 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 数据集
|
||||
case_markers:
|
||||
- gitlink
|
||||
- repo
|
||||
- dataset
|
||||
- debug
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 前提条件:当前存找一个仓库,仓库已经创建数据集
|
||||
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_projects_new_project_01
|
||||
- gitlink_repo_new_dataset_02
|
||||
- gitlink_repo_get_dataset_detail_01
|
||||
teardown:
|
||||
interface:
|
||||
- gitlink_projects_delete_project_01
|
||||
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_repo_upload_dataset_file_01
|
||||
title: 上传数据集文件,上传成功
|
||||
severity: critical
|
||||
run: false
|
||||
url: /api/attachments.json
|
||||
method: POST
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
container_type: ProjectDataset
|
||||
description: ${generate_paragraph(nb=5)}
|
||||
container_id: ${dataset_container_id}
|
||||
file: ${get_file_content('gitlinklogo3.jpg')}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertField:
|
||||
expect_value: content_type
|
||||
assert_type: contains
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
dataset_container_id: $.id
|
||||
case_dependence:
|
||||
@@ -38,10 +38,10 @@ case_info:
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_project_name: $.project_name
|
||||
repo_project_identifier: $.project_identifier
|
||||
repo_project_private: $.private
|
||||
repo_project_description: $.project_description
|
||||
repo_project_language_id: $.project_language_id
|
||||
repo_project_category_id: $.project_category_id
|
||||
repo_name: $.project_name
|
||||
repo_identifier: $.project_identifier
|
||||
repo_private: $.private
|
||||
repo_description: $.project_description
|
||||
repo_language_id: $.project_language_id
|
||||
repo_category_id: $.project_category_id
|
||||
case_dependence:
|
||||
|
||||
@@ -31,13 +31,13 @@ case_info:
|
||||
request_type: json
|
||||
payload:
|
||||
name: update-name-${generate_words} # 项目名称
|
||||
identifier: ${repo_project_identifier} # 项目标识
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_project_identifier}
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
@@ -65,14 +65,14 @@ case_info:
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
name: ${repo_name} # 项目名称
|
||||
identifier: update_${generate_identifier()}_${generate_identifier()} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertName:
|
||||
message: 断言接口返回的name
|
||||
expect_value: ${repo_project_name}
|
||||
expect_value: ${repo_name}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.name
|
||||
assertPrivate:
|
||||
@@ -102,15 +102,15 @@ case_info:
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
project_category_id: ${random.choice(${repo_project_category_ids})} # 项目类别ID
|
||||
identifier: ${repo_project_identifier} # 项目标识
|
||||
name: ${repo_name} # 项目名称
|
||||
project_category_id: ${random.choice(${repo_category_ids})} # 项目类别ID
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_project_identifier}
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
@@ -139,15 +139,15 @@ case_info:
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
project_language_id: ${random.choice(${repo_project_language_ids})} # 项目语言ID
|
||||
identifier: ${repo_project_identifier} # 项目标识
|
||||
name: ${repo_name} # 项目名称
|
||||
project_language_id: ${random.choice(${repo_language_ids})} # 项目语言ID
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_project_identifier}
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
@@ -179,13 +179,13 @@ case_info:
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
private: False # 项目是否为私有项目
|
||||
identifier: ${repo_project_identifier} # 项目标识
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertMessage:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_project_identifier}
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
|
||||
@@ -31,13 +31,13 @@ case_info:
|
||||
request_type: json
|
||||
payload:
|
||||
name: update-name-${generate_words} # 项目名称
|
||||
identifier: ${repo_project_identifier} # 项目标识
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_project_identifier}
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
@@ -65,14 +65,14 @@ case_info:
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
name: ${repo_name} # 项目名称
|
||||
identifier: update_${generate_identifier()}_${generate_identifier()} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertName:
|
||||
message: 断言接口返回的name
|
||||
expect_value: ${repo_project_name}
|
||||
expect_value: ${repo_name}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.name
|
||||
assertPrivate:
|
||||
@@ -102,15 +102,15 @@ case_info:
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
project_category_id: ${random.choice(${repo_project_category_ids})} # 项目类别ID
|
||||
identifier: ${repo_project_identifier} # 项目标识
|
||||
name: ${repo_name} # 项目名称
|
||||
project_category_id: ${random.choice(${repo_category_ids})} # 项目类别ID
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_project_identifier}
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
@@ -140,14 +140,14 @@ case_info:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
project_language_id: ${random.choice(${repo_project_language_ids})} # 项目语言ID
|
||||
identifier: ${repo_project_identifier} # 项目标识
|
||||
project_language_id: ${random.choice(${repo_language_ids})} # 项目语言ID
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_project_identifier}
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
@@ -176,15 +176,15 @@ case_info:
|
||||
cookies:
|
||||
request_type: json
|
||||
payload:
|
||||
name: ${repo_project_name} # 项目名称
|
||||
name: ${repo_name} # 项目名称
|
||||
private: True # 项目是否为私有项目
|
||||
identifier: ${repo_project_identifier} # 项目标识
|
||||
identifier: ${repo_identifier} # 项目标识
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assertIdentifier:
|
||||
message: 断言接口返回的identifier
|
||||
expect_value: ${repo_project_identifier}
|
||||
expect_value: ${repo_identifier}
|
||||
assert_type: ==
|
||||
type_jsonpath: $.identifier
|
||||
assertPrivate:
|
||||
|
||||
@@ -33,5 +33,7 @@ case_info:
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_project_category_ids: $.project_categories[*].id
|
||||
repo_category_ids: $.project_categories[*].id
|
||||
repo_category_id: $.project_categories[0].id
|
||||
repo_category_name: $.project_categories[0].name
|
||||
case_dependence:
|
||||
@@ -9,7 +9,7 @@ case_common:
|
||||
# 用例数据
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_projects_get_ignores_01
|
||||
id: gitlink_get_repo_ignores_01
|
||||
title: 获取gitignore列表数据
|
||||
severity: normal
|
||||
run: True
|
||||
@@ -25,4 +25,7 @@ case_info:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_sql:
|
||||
extract:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
ignores_id: $.ignores[0].id
|
||||
ignores_name: $.ignores[0].name
|
||||
@@ -33,5 +33,7 @@ case_info:
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
repo_project_language_ids: $.project_languages[*].id
|
||||
repo_language_ids: $.project_languages[*].id
|
||||
repo_language_id: $.project_languages[0].id
|
||||
repo_language_name: $.project_languages[0].name
|
||||
case_dependence:
|
||||
@@ -0,0 +1,32 @@
|
||||
case_common:
|
||||
allure_epic: GitLink接口
|
||||
allure_feature: 开源项目模块
|
||||
allure_story: 项目
|
||||
case_markers:
|
||||
- gitlink
|
||||
- usefixtures: gitlink_login
|
||||
|
||||
# 用例数据
|
||||
case_info:
|
||||
-
|
||||
id: gitlink_get_repo_licenses_01
|
||||
title: 获取开源许可证列表数据
|
||||
severity: normal
|
||||
run: True
|
||||
url: /api/licenses.json
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
cookies: ${cookies}
|
||||
cookies:
|
||||
request_type: params
|
||||
payload:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
assert_sql:
|
||||
extract:
|
||||
type_jsonpath:
|
||||
licenses_ids: $.licenses[*].id
|
||||
licenses_id: $.licenses[0].id
|
||||
licenses_name: $.licenses[0].name
|
||||
@@ -11,6 +11,12 @@ case_common:
|
||||
|
||||
# 放置公共依赖 (仅yaml用例支持,excel用例不支持)
|
||||
common_dependence:
|
||||
setup:
|
||||
interface:
|
||||
- gitlink_get_repo_licenses_01
|
||||
- gitlink_get_repo_ignores_01
|
||||
- gitlink_get_repo_category_01
|
||||
- gitlink_get_repo_language_01
|
||||
|
||||
|
||||
case_info:
|
||||
@@ -88,7 +94,7 @@ case_info:
|
||||
-
|
||||
id: gitlink_projects_new_project_03
|
||||
title: 输入所有参数,新建项目成功
|
||||
run: false
|
||||
run: true
|
||||
url: /api/projects.json
|
||||
method: POST
|
||||
headers:
|
||||
@@ -99,24 +105,23 @@ case_info:
|
||||
user_id: ${user_id}
|
||||
name: test_${generate_identifier()}_${generate_identifier()}
|
||||
repository_name: ${generate_identifier()}_test
|
||||
description:
|
||||
description: ${generate_paragraph()}
|
||||
private: true
|
||||
ignoreFlag: true
|
||||
ignore_id:
|
||||
ignore:
|
||||
ignore_id: ${ignores_id}
|
||||
ignore: ${ignores_name}
|
||||
licenseFlag: true
|
||||
license_id:
|
||||
license:
|
||||
license_id: ${licenses_id}
|
||||
license: ${licenses_name}
|
||||
categoreFlag: true
|
||||
project_category_id:
|
||||
project_category:
|
||||
project_category_id: ${repo_category_id}
|
||||
project_category: ${repo_category_name}
|
||||
languageFlag: true
|
||||
project_language_id:
|
||||
project_language:
|
||||
blockchain: false
|
||||
blockchain_token_all: 10000
|
||||
blockchain_init_token:
|
||||
auth_password:
|
||||
project_language_id: ${repo_language_id}
|
||||
project_language: ${repo_language_name}
|
||||
# blockchain: false
|
||||
# blockchain_token_all: 10000
|
||||
# blockchain_init_token:
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
|
||||
@@ -16,7 +16,7 @@ case_info:
|
||||
title: 获取wiki库的sidebar信息
|
||||
severity: normal
|
||||
run: True
|
||||
url: ${wiki_host}/api/wiki/wikiPages
|
||||
url: ${wiki_host}/api/wiki/getWiki
|
||||
method: GET
|
||||
headers:
|
||||
Content-Type: application/json; charset=utf-8;
|
||||
|
||||
@@ -8,7 +8,6 @@ case_common:
|
||||
- gitea
|
||||
- new_wiki
|
||||
- usefixtures: gitlink_login
|
||||
- skip: 暂时跳过
|
||||
|
||||
|
||||
common_dependence:
|
||||
@@ -49,5 +48,9 @@ case_info:
|
||||
assert_sql:
|
||||
extract:
|
||||
case_dependence:
|
||||
setup:
|
||||
interface: gitlink_repo_get_wiki_sidebar_01
|
||||
teardown:
|
||||
interface: gitlink_repo_delete_wiki_01
|
||||
interface:
|
||||
- gitlink_repo_update_wiki_sidebar_01
|
||||
# - gitlink_repo_delete_wiki_01
|
||||
|
||||
@@ -17,7 +17,7 @@ case_info:
|
||||
id: gitlink_repo_update_wiki_sidebar_01
|
||||
title: 更新wiki库的sidebar
|
||||
severity: critical
|
||||
run: True
|
||||
run: false
|
||||
url: ${wiki_host}/api/wiki/updateWiki
|
||||
method: PUT
|
||||
headers:
|
||||
@@ -31,8 +31,8 @@ case_info:
|
||||
projectId: ${env_project_id} # 必填 gitlink项目id
|
||||
pageName: _Sidebar
|
||||
title: _Sidebar
|
||||
message: # 选填,提交信息
|
||||
content_base64:
|
||||
message: 更新sidebar文件 # 选填,提交信息
|
||||
content_base64: ${update_wiki_sidebar('${wiki_sidebar_content}', '${env_page_title}')}
|
||||
files:
|
||||
assert_response:
|
||||
status_code: 200
|
||||
|
||||
Reference in New Issue
Block a user