-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathauth.yaml
More file actions
35 lines (34 loc) · 1.16 KB
/
Copy pathauth.yaml
File metadata and controls
35 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
# ndls 登录 stage anchor 定义源。
#
# Tavern 的 !include 只引入 variables,不引入 stage anchor(事实性修正:
# 原计划 auth.yaml 通过 !include 共享 anchor 不可行)。本文件作为 anchor
# 标准定义源,供:
# - 人工复制 &ndls_login 到 test 文件的 stages 开头
# - gen_smoke_yaml.py(issue 03)读取并注入到生成的冒烟 yaml
#
# 复制 &ndls_login 到 test 文件后,后续 stage 用 *ndls_login 引用,
# token 通过 save 提取为 {auth_token:s},m-token header 用 "meta {auth_token:s}"。
#
# loginMode/loginType:puffin.md 提到 doLogin body 含此二字段(前端枚举
# LoginModeEnum/LoginTypeEnum),具体取值待确认。先不写,跑通后按需补。
stages:
- &ndls_login
name: 登录 ndls
request:
url: "{base_url}/api/master/auth/login/doLogin"
method: POST
json:
loginId: "{login_id}"
password: "{encrypted_pwd}"
loginMode: USERNAME
loginType: WEB
headers:
content-type: application/json
response:
status_code: 200
json:
success: true
save:
json:
auth_token: data.token