Merge branch 'v1.8' of github.com:metersphere/metersphere into v1.8
This commit is contained in:
commit
11bb0cf5a4
|
@ -89,7 +89,6 @@ public class MsScenario extends MsTestElement {
|
||||||
JSONObject element = JSON.parseObject(scenario.getScenarioDefinition());
|
JSONObject element = JSON.parseObject(scenario.getScenarioDefinition());
|
||||||
hashTree = mapper.readValue(element.getString("hashTree"), new TypeReference<LinkedList<MsTestElement>>() {
|
hashTree = mapper.readValue(element.getString("hashTree"), new TypeReference<LinkedList<MsTestElement>>() {
|
||||||
});
|
});
|
||||||
OldVersionUtil.transferHashTree(hashTree);
|
|
||||||
// 场景变量
|
// 场景变量
|
||||||
if (StringUtils.isNotEmpty(element.getString("variables"))) {
|
if (StringUtils.isNotEmpty(element.getString("variables"))) {
|
||||||
LinkedList<ScenarioVariable> variables = mapper.readValue(element.getString("variables"),
|
LinkedList<ScenarioVariable> variables = mapper.readValue(element.getString("variables"),
|
||||||
|
|
|
@ -163,7 +163,6 @@ public abstract class MsTestElement {
|
||||||
element = mapper.readValue(apiDefinition.getRequest(), new TypeReference<MsTestElement>() {
|
element = mapper.readValue(apiDefinition.getRequest(), new TypeReference<MsTestElement>() {
|
||||||
});
|
});
|
||||||
hashTree.add(element);
|
hashTree.add(element);
|
||||||
OldVersionUtil.transferHashTree(hashTree);
|
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
|
|
|
@ -82,11 +82,6 @@ public class HistoricalDataUpgradeService {
|
||||||
scenario.setName(oldScenario.getName());
|
scenario.setName(oldScenario.getName());
|
||||||
scenario.setEnableCookieShare(oldScenario.isEnableCookieShare());
|
scenario.setEnableCookieShare(oldScenario.isEnableCookieShare());
|
||||||
scenario.setEnvironmentId(oldScenario.getEnvironmentId());
|
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.setReferenced("Upgrade");
|
||||||
scenario.setId(oldScenario.getId());
|
scenario.setId(oldScenario.getId());
|
||||||
scenario.setResourceId(UUID.randomUUID().toString());
|
scenario.setResourceId(UUID.randomUUID().toString());
|
||||||
|
@ -431,9 +426,6 @@ public class HistoricalDataUpgradeService {
|
||||||
num++;
|
num++;
|
||||||
scenarioTest.setHashTree(listSteps);
|
scenarioTest.setHashTree(listSteps);
|
||||||
if (StringUtils.isNotEmpty(envId)) {
|
if (StringUtils.isNotEmpty(envId)) {
|
||||||
HashMap<String, String> envMap = new HashMap<>();
|
|
||||||
envMap.put(saveHistoricalDataUpgrade.getProjectId(), envId);
|
|
||||||
scenarioTest.setEnvironmentMap(envMap);
|
|
||||||
scenarioTest.setEnvironmentId(envId);
|
scenarioTest.setEnvironmentId(envId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue