82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
case_common:
|
||
allure_epic: GitLink接口
|
||
allure_feature: 开源项目模块
|
||
allure_story: 项目
|
||
case_markers:
|
||
- gitlink
|
||
- projects
|
||
- gitea
|
||
- fork_project
|
||
- usefixtures: gitlink_login
|
||
|
||
common_dependence:
|
||
setup:
|
||
env_vars:
|
||
repo_owner: ${env_login}
|
||
teardown:
|
||
interface:
|
||
- gitlink_projects_delete_project_01
|
||
|
||
case_info:
|
||
-
|
||
id: gitlink_projects_fork_project_01
|
||
title: fork项目
|
||
severity: critical
|
||
run: True
|
||
url: /api/${env_repo_owner}/${env_repo_identifier}/forks.json
|
||
method: POST
|
||
headers:
|
||
Content-Type: application/json; charset=utf-8;
|
||
cookies: ${cookies}
|
||
cookies:
|
||
request_type: json
|
||
payload:
|
||
files:
|
||
assert_response:
|
||
status_code: 200
|
||
assertStatus:
|
||
message: 断言接口返回status=0
|
||
expect_value: 0
|
||
assert_type: ==
|
||
type_jsonpath: $.status
|
||
assertMessage:
|
||
message: 断言接口返回message
|
||
expect_value: fork项目成功
|
||
assert_type: ==
|
||
type_jsonpath: $.message
|
||
assert_sql:
|
||
extract:
|
||
type_jsonpath:
|
||
repo_id: $.id
|
||
repo_identifier: $.identifier
|
||
case_dependence:
|
||
|
||
-
|
||
id: gitlink_projects_fork_project_02
|
||
title: fork项目 - 已经fork过了继续fork
|
||
severity: critical
|
||
run: True
|
||
url: /api/${env_repo_owner}/${env_repo_identifier}/forks.json
|
||
method: POST
|
||
headers:
|
||
Content-Type: application/json; charset=utf-8;
|
||
cookies: ${cookies}
|
||
cookies:
|
||
request_type: json
|
||
payload:
|
||
files:
|
||
assert_response:
|
||
status_code: 200
|
||
assertStatus:
|
||
message: 断言接口返回status=0
|
||
expect_value: 0
|
||
assert_type: ==
|
||
type_jsonpath: $.status
|
||
assertMessage:
|
||
message: 断言接口返回message
|
||
expect_value: fork失败,你已拥有了这个项目 autotest
|
||
assert_type: ==
|
||
type_jsonpath: $.message
|
||
assert_sql:
|
||
extract:
|
||
case_dependence: |