From d99cab1db5a3ab2b07ecfa73de432835c7944c15 Mon Sep 17 00:00:00 2001 From: chenlinghy Date: Mon, 14 Sep 2020 16:06:09 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=E8=B0=83=E6=95=B4=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=AE=BE=E5=A4=87=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E7=9A=84=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/qa/testcase/v20/P2DeviceUpgrade.java | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/test/java/com/dispose/test/qa/testcase/v20/P2DeviceUpgrade.java b/src/test/java/com/dispose/test/qa/testcase/v20/P2DeviceUpgrade.java index 8d9cc673..9ec31a31 100644 --- a/src/test/java/com/dispose/test/qa/testcase/v20/P2DeviceUpgrade.java +++ b/src/test/java/com/dispose/test/qa/testcase/v20/P2DeviceUpgrade.java @@ -263,8 +263,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) (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") @@ -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) (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为空")