Merge remote-tracking branch 'origin/v2.0.0_dev' into v2.0.0_dev
This commit is contained in:
commit
68b48f13ce
|
@ -261,8 +261,45 @@ public class P2DeviceUpgrade {
|
|||
})
|
||||
.build(),
|
||||
|
||||
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 + 7)
|
||||
.id(BASE_P2_DEVICE_UPGRADE_ID + 8)
|
||||
.name("更新虚拟能力节点url信息")
|
||||
.priority(TestPriority.P2_PRIORITY)
|
||||
.urlPath("/manager/upgrade")
|
||||
|
@ -302,7 +339,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")
|
||||
|
@ -342,7 +379,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")
|
||||
|
@ -382,7 +419,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")
|
||||
|
@ -422,7 +459,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")
|
||||
|
@ -463,7 +500,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")
|
||||
|
@ -504,7 +541,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")
|
||||
|
@ -544,43 +581,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为空")
|
||||
|
|
Loading…
Reference in New Issue