fix(场景自动化): 修复升级环境问题

This commit is contained in:
shiziyuan9527 2021-03-30 11:30:23 +08:00
parent e56e2e19b5
commit b2f5eab0b6
3 changed files with 0 additions and 10 deletions

View File

@ -89,7 +89,6 @@ public class MsScenario extends MsTestElement {
JSONObject element = JSON.parseObject(scenario.getScenarioDefinition());
hashTree = mapper.readValue(element.getString("hashTree"), new TypeReference<LinkedList<MsTestElement>>() {
});
OldVersionUtil.transferHashTree(hashTree);
// 场景变量
if (StringUtils.isNotEmpty(element.getString("variables"))) {
LinkedList<ScenarioVariable> variables = mapper.readValue(element.getString("variables"),

View File

@ -163,7 +163,6 @@ public abstract class MsTestElement {
element = mapper.readValue(apiDefinition.getRequest(), new TypeReference<MsTestElement>() {
});
hashTree.add(element);
OldVersionUtil.transferHashTree(hashTree);
}
} catch (Exception ex) {
ex.printStackTrace();

View File

@ -82,11 +82,6 @@ public class HistoricalDataUpgradeService {
scenario.setName(oldScenario.getName());
scenario.setEnableCookieShare(oldScenario.isEnableCookieShare());
scenario.setEnvironmentId(oldScenario.getEnvironmentId());
if (StringUtils.isNotEmpty(oldScenario.getEnvironmentId())) {
HashMap<String, String> envMap = new HashMap<>();
envMap.put(projectId, oldScenario.getEnvironmentId());
scenario.setEnvironmentMap(envMap);
}
scenario.setReferenced("Upgrade");
scenario.setId(oldScenario.getId());
scenario.setResourceId(UUID.randomUUID().toString());
@ -431,9 +426,6 @@ public class HistoricalDataUpgradeService {
num++;
scenarioTest.setHashTree(listSteps);
if (StringUtils.isNotEmpty(envId)) {
HashMap<String, String> envMap = new HashMap<>();
envMap.put(saveHistoricalDataUpgrade.getProjectId(), envId);
scenarioTest.setEnvironmentMap(envMap);
scenarioTest.setEnvironmentId(envId);
}