REM:
1.调整更新设备单元测试用例的顺序
This commit is contained in:
chenlinghy 2020-09-14 16:06:09 +08:00
parent 1a2b7121fd
commit d99cab1db5
1 changed files with 44 additions and 44 deletions

View File

@ -265,6 +265,43 @@ public class P2DeviceUpgrade {
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 7)
.name("更新迪普清洗带宽")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
.method(RequestMethod.POST)
.caseJsonValue("{\"ver\":3,\"cryptoType\":0,\"timeStamp\":1599094454403," +
"\"msgContent\":{\"items\":[{\"ipAddr\":\"127.0.0.1\",\"ipPort\":\"\"," +
"\"deviceType\":0,\"areaCode\":0,\"deviceName\":\"中移杭研实验室迪普清洗设备\"," +
"\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"version\":\"5.7.13\"," +
"\"userName\":\"admin\",\"password\":\"testpassword\"," +
"\"urlPath\":\"UMC/service/AbnormalFlowCleaningService\",\"urlType\":0," +
"\"readme\":\"实验室测试设备\",\"capacity\":[{\"capacityType\":0,\"objectType\":1," +
"\"ipType\":1,\"protectIp\":\"192.168.20.1/24\",\"reserveNetflow\":100}," +
"{\"capacityType\":1,\"objectType\":4,\"reserveNetflow\":20}]}]}}")
.rspClass(CommDeviceListRsp.class)
.rspCode(ErrorCode.ERR_OK)
.autoLogin(true)
.verifyCallback((VerifyProtoRespCallback<CommDeviceListRsp>) (v, e, c) -> {
DisposeDevice dev = verifyDpTechDeviceAddResp(v, e, c, DisposeDeviceType.DPTECH_UMC,
new HashMap<>());
Assert.assertEquals(dev.getDevCapacity().size(), 2);
dev.getDevCapacity().forEach(k -> {
if (k.getCapacityType() == DisposeCapacityType.CLEANUP) {
Assert.assertEquals((long) k.getObjectType().getValue(), 1);
Assert.assertEquals((long) k.getIpType().getValue(), 1);
Assert.assertEquals((long) k.getReserveNetflow(), 100);
Assert.assertEquals(k.getProtectIp(), "192.168.20.1/24");
} else {
Assert.assertEquals((long) k.getObjectType().getValue(), 4);
Assert.assertEquals((long) k.getReserveNetflow(), 20);
}
});
})
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 8)
.name("更新虚拟能力节点url信息")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
@ -304,7 +341,7 @@ public class P2DeviceUpgrade {
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 8)
.id(BASE_P2_DEVICE_UPGRADE_ID + 9)
.name("更新能力节点设备名称")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
@ -344,7 +381,7 @@ public class P2DeviceUpgrade {
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 9)
.id(BASE_P2_DEVICE_UPGRADE_ID + 10)
.name("更新能力节点型号")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
@ -384,7 +421,7 @@ public class P2DeviceUpgrade {
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 10)
.id(BASE_P2_DEVICE_UPGRADE_ID + 11)
.name("更新能力节点版本")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
@ -424,7 +461,7 @@ public class P2DeviceUpgrade {
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 11)
.id(BASE_P2_DEVICE_UPGRADE_ID + 12)
.name("更新虚拟能力节点系统管理用户名")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
@ -465,7 +502,7 @@ public class P2DeviceUpgrade {
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 12)
.id(BASE_P2_DEVICE_UPGRADE_ID + 13)
.name("更新虚拟能力节点系统管理密码")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
@ -506,7 +543,7 @@ public class P2DeviceUpgrade {
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 13)
.id(BASE_P2_DEVICE_UPGRADE_ID + 14)
.name("更新虚拟能力节点URL类型")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
@ -546,43 +583,6 @@ public class P2DeviceUpgrade {
})
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 14)
.name("更新迪普清洗带宽")
.priority(TestPriority.P2_PRIORITY)
.urlPath("/manager/upgrade")
.method(RequestMethod.POST)
.caseJsonValue("{\"ver\":3,\"cryptoType\":0,\"timeStamp\":1599094454403," +
"\"msgContent\":{\"items\":[{\"ipAddr\":\"127.0.0.1\",\"ipPort\":\"\"," +
"\"deviceType\":0,\"areaCode\":0,\"deviceName\":\"中移杭研实验室迪普清洗设备\"," +
"\"manufacturer\":\"DPTech\",\"model\":\"UMC\",\"version\":\"5.7.13\"," +
"\"userName\":\"admin\",\"password\":\"testpassword\"," +
"\"urlPath\":\"UMC/service/AbnormalFlowCleaningService\",\"urlType\":0," +
"\"readme\":\"实验室测试设备\",\"capacity\":[{\"capacityType\":0,\"objectType\":1," +
"\"ipType\":1,\"protectIp\":\"192.168.20.1/24\",\"reserveNetflow\":100}," +
"{\"capacityType\":1,\"objectType\":4,\"reserveNetflow\":20}]}]}}")
.rspClass(CommDeviceListRsp.class)
.rspCode(ErrorCode.ERR_OK)
.autoLogin(true)
.verifyCallback((VerifyProtoRespCallback<CommDeviceListRsp>) (v, e, c) -> {
DisposeDevice dev = verifyDpTechDeviceAddResp(v, e, c, DisposeDeviceType.DPTECH_UMC,
new HashMap<>());
Assert.assertEquals(dev.getDevCapacity().size(), 2);
dev.getDevCapacity().forEach(k -> {
if (k.getCapacityType() == DisposeCapacityType.CLEANUP) {
Assert.assertEquals((long) k.getObjectType().getValue(), 1);
Assert.assertEquals((long) k.getIpType().getValue(), 1);
Assert.assertEquals((long) k.getReserveNetflow(), 100);
Assert.assertEquals(k.getProtectIp(), "192.168.20.1/24");
} else {
Assert.assertEquals((long) k.getObjectType().getValue(), 4);
Assert.assertEquals((long) k.getReserveNetflow(), 20);
}
});
})
.build(),
QATestItem.builder()
.id(BASE_P2_DEVICE_UPGRADE_ID + 15)
.name("msgContent为空")