fix(旧版本接口测试): 兼容新版本定义的环境
This commit is contained in:
parent
3936d17151
commit
1b9328cc15
|
@ -197,12 +197,14 @@ export default {
|
|||
if(this.scenario.environment && this.scenario.environment.config.httpConfig
|
||||
&& this.scenario.environment.config.httpConfig.conditions && this.scenario.environment.config.httpConfig.conditions.length > 0){
|
||||
for(let i in this.scenario.environment.config.httpConfig.conditions) {
|
||||
if (this.scenario.environment.config.httpConfig.conditions[i]) {
|
||||
let item = this.scenario.environment.config.httpConfig.conditions[i];
|
||||
if (item.type === 'NONE') {
|
||||
url = item.protocol + '://' + item.socket + (this.request.path ? this.request.path : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(url === null) {
|
||||
url = (this.scenario.environment && this.scenario.environment.config.httpConfig.socket) ?
|
||||
this.scenario.environment.config.httpConfig.protocol + '://' + this.scenario.environment.config.httpConfig.socket + (this.request.path ? this.request.path : '')
|
||||
|
|
Loading…
Reference in New Issue