6
0

test(passport): 更新客户端测试用例和找回密码接口

- 修改了 ChangePassword 请求的密码参数
- 优化了测试用例的断言和日志输出
This commit is contained in:
liguanjie 2025-09-11 18:09:29 +08:00
parent 07bdfcb7b3
commit c81fa6be2c
2 changed files with 4 additions and 3 deletions

View File

@ -85,12 +85,12 @@ func TestChangePassword(t *testing.T) {
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
req := CreateChangePasswordRequest("rz35990497", "654321") req := CreateChangePasswordRequest("rz35990497", "7654321")
req.AcceptFormat = "text"
resp, err := client.ChangePassword(req) resp, err := client.ChangePassword(req)
if err != nil { if err != nil {
t.Error(err) t.Error(err)
} }
// 记录文本结果 // 记录文本结果
t.Logf("resp data:%+v", resp.GetHttpContentString()) t.Logf("resp code:%+v, msg:%s", resp.Code, resp.Msg)
} }

View File

@ -24,6 +24,7 @@ func CreateChangePasswordRequest(userName string, newPwd string) (req *ChangePas
"newpwd": newPwd, "newpwd": newPwd,
"time": fmt.Sprintf("%v", ts), "time": fmt.Sprintf("%v", ts),
"sign": sign, "sign": sign,
"format": "json",
} }
req.Method = requests.POST req.Method = requests.POST