refactor(接口测试): 历史数据兼容,默认不开启变量规则
This commit is contained in:
parent
cb2807c840
commit
e7abfb42a1
|
@ -201,7 +201,7 @@ public class MsHashTreeService {
|
||||||
private JSONObject setRefScenario(JSONObject element) {
|
private JSONObject setRefScenario(JSONObject element) {
|
||||||
boolean enable = element.has(ENABLE) ? element.optBoolean(ENABLE) : true;
|
boolean enable = element.has(ENABLE) ? element.optBoolean(ENABLE) : true;
|
||||||
if (!element.has(MIX_ENABLE)) {
|
if (!element.has(MIX_ENABLE)) {
|
||||||
element.put(MIX_ENABLE, true);
|
element.put(MIX_ENABLE, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiScenarioDTO scenarioWithBLOBs = extApiScenarioMapper.selectById(element.optString(ID));
|
ApiScenarioDTO scenarioWithBLOBs = extApiScenarioMapper.selectById(element.optString(ID));
|
||||||
|
@ -209,7 +209,7 @@ public class MsHashTreeService {
|
||||||
boolean environmentEnable = element.has(ENV_ENABLE) ? element.optBoolean(ENV_ENABLE) : false;
|
boolean environmentEnable = element.has(ENV_ENABLE) ? element.optBoolean(ENV_ENABLE) : false;
|
||||||
boolean variableEnable = element.has(VARIABLE_ENABLE) ? element.optBoolean(VARIABLE_ENABLE) : false;
|
boolean variableEnable = element.has(VARIABLE_ENABLE) ? element.optBoolean(VARIABLE_ENABLE) : false;
|
||||||
boolean mixEnable = element.has(MIX_ENABLE)
|
boolean mixEnable = element.has(MIX_ENABLE)
|
||||||
? element.getBoolean(MIX_ENABLE) : true;
|
? element.getBoolean(MIX_ENABLE) : false;
|
||||||
|
|
||||||
if (environmentEnable && StringUtils.isNotEmpty(scenarioWithBLOBs.getEnvironmentJson())) {
|
if (environmentEnable && StringUtils.isNotEmpty(scenarioWithBLOBs.getEnvironmentJson())) {
|
||||||
element.put(ENV_MAP, JSON.parseObject(scenarioWithBLOBs.getEnvironmentJson(), Map.class));
|
element.put(ENV_MAP, JSON.parseObject(scenarioWithBLOBs.getEnvironmentJson(), Map.class));
|
||||||
|
|
Loading…
Reference in New Issue