refactor(场景自动化): 运行环境优化

This commit is contained in:
shiziyuan9527 2021-03-29 12:03:14 +08:00
parent 9c96088006
commit 033a4a69f0
2 changed files with 8 additions and 2 deletions

View File

@ -619,7 +619,10 @@
} }
}, },
canExecWithOutEnv(type, path) { canExecWithOutEnv(type, path) {
return type !== ELEMENT_TYPE.HTTPSamplerProxy ? !this.checkCanExec(type) : this.isHTTPFullPath(path); if (type === ELEMENT_TYPE.HTTPSamplerProxy) {
return this.isHTTPFullPath(path);
}
return type === ELEMENT_TYPE.JSR223Processor ? true : !this.checkCanExec(type);
}, },
isHTTPFullPath(path) { isHTTPFullPath(path) {
return path ? path.startsWith("http://") || path.startsWith("https://") : false; return path ? path.startsWith("http://") || path.startsWith("https://") : false;

View File

@ -531,7 +531,10 @@
} }
}, },
canExecWithOutEnv(type, path) { canExecWithOutEnv(type, path) {
return type !== ELEMENT_TYPE.HTTPSamplerProxy ? !this.checkCanExec(type) : this.isHTTPFullPath(path); if (type === ELEMENT_TYPE.HTTPSamplerProxy) {
return this.isHTTPFullPath(path);
}
return type === ELEMENT_TYPE.JSR223Processor ? true : !this.checkCanExec(type);
}, },
isHTTPFullPath(path) { isHTTPFullPath(path) {
return path ? path.startsWith("http://") || path.startsWith("https://") : false; return path ? path.startsWith("http://") || path.startsWith("https://") : false;