Merge pull request #8789 from metersphere/pr@dev@fix_接口用例在请求内容选no_auth_报错
fix(接口测试): 接口用例在请求内容选no auth 报错
This commit is contained in:
commit
6a512ee51a
|
@ -99,18 +99,17 @@ export default {
|
||||||
if (this.authConfig.username == undefined && this.authConfig.password == undefined) {
|
if (this.authConfig.username == undefined && this.authConfig.password == undefined) {
|
||||||
this.authConfig = authManager;
|
this.authConfig = authManager;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
if (this.request.hashTree) {
|
|
||||||
for (let index in this.request.hashTree) {
|
|
||||||
if (this.request.hashTree[index].type === "AuthManager") {
|
|
||||||
this.request.hashTree.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.request.authManager = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
this.request.authManager = this.authConfig;
|
this.request.authManager = this.authConfig;
|
||||||
|
} else {
|
||||||
|
let authManager = createComponent("AuthManager");
|
||||||
|
authManager.verification = "No Auth";
|
||||||
|
if (this.request.hashTree == undefined) {
|
||||||
|
this.request.hashTree = [];
|
||||||
|
}
|
||||||
|
this.request.hashTree.push(authManager);
|
||||||
|
this.authConfig = authManager;
|
||||||
|
this.request.authManager = this.authConfig;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
initData() {
|
initData() {
|
||||||
if (this.request.hashTree) {
|
if (this.request.hashTree) {
|
||||||
|
|
Loading…
Reference in New Issue