fix(接口定义): 修复接口自动化中自定义请求域名用变量的情况下,认证配置不生效的缺陷
--bug=1016601 --user=王孝刚 【接口测试】github#17678,接口自动化中自定义请求域名用变量的情况下,认证配置不生效 https://www.tapd.cn/55049933/s/1239577
This commit is contained in:
parent
0a35673ad1
commit
45b771f0ff
|
@ -68,16 +68,7 @@ public class MsAuthManager extends MsTestElement {
|
|||
ParameterConfig config = (ParameterConfig) msParameter;
|
||||
AuthManager authManager = initBase();
|
||||
Authorization auth = new Authorization();
|
||||
if (this.url != null) {
|
||||
auth.setURL(this.url);
|
||||
} else {
|
||||
if (config != null && config.isEffective(this.getProjectId())) {
|
||||
if (config.isEffective(this.getProjectId())) {
|
||||
String url = config.getConfig().get(this.getProjectId()).getHttpConfig().getProtocol() + "://" + config.getConfig().get(this.getProjectId()).getHttpConfig().getSocket();
|
||||
auth.setURL(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
auth.setURL("");
|
||||
auth.setUser(this.username);
|
||||
auth.setPass(this.password);
|
||||
auth.setMechanism(mechanismMap.get(this.getVerification()));
|
||||
|
@ -90,7 +81,7 @@ public class MsAuthManager extends MsTestElement {
|
|||
try {
|
||||
AuthManager authManager = initBase();
|
||||
Authorization auth = new Authorization();
|
||||
auth.setURL(samplerProxy.getProtocol() + "://" + samplerProxy.getDomain());
|
||||
auth.setURL("");
|
||||
auth.setUser(msAuthManager.getUsername());
|
||||
auth.setPass(msAuthManager.getPassword());
|
||||
auth.setMechanism(mechanismMap.get(msAuthManager.getVerification()));
|
||||
|
|
Loading…
Reference in New Issue