1、修复审批人 创建人bug
2、容器内时间和宿主机器一致-v /etc/localtime:/etc/localtime 3、loginserver解决
This commit is contained in:
@@ -165,16 +165,19 @@ class ProtectObjectServiceTest extends ProtectionApplicationTests {
|
||||
|
||||
@Test
|
||||
void changeProtectObjectAuditStatus() {
|
||||
int testNum = 0;
|
||||
for (int i = 300; i < 100000; i++) {
|
||||
if (protectObjectService.queryProtectObject(i) != null) {
|
||||
testNum = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
assertTrue((Boolean) protectObjectService.changeProtectObjectAuditStatus(testNum, 1).get("success"));
|
||||
int finalTestNum = testNum;
|
||||
assertThrows(IllegalArgumentException.class, () -> protectObjectService.changeProtectObjectAuditStatus(finalTestNum, 2));
|
||||
// int testNum = 0;
|
||||
// for (int i = 300; i < 100000; i++) {
|
||||
// if (protectObjectService.queryProtectObject(i) != null) {
|
||||
// testNum = i;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// assertTrue((Boolean) protectObjectService.changeProtectObjectAuditStatus(testNum, 1).get("success"));
|
||||
// int finalTestNum = testNum;
|
||||
// assertThrows(IllegalArgumentException.class, () -> protectObjectService.changeProtectObjectAuditStatus(finalTestNum, 2));
|
||||
|
||||
assertTrue((Boolean) protectObjectService.changeProtectObjectAuditStatus(70330, 1,"sss",111,"ssssss").get("success"));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -78,6 +78,6 @@ public class NewTemplateServiceTest {
|
||||
List<TemplateNew> templates = templateService.queryTemplates(
|
||||
null, null, null, null, null,null, null,1,3);
|
||||
TemplateNew testTemplate = templates.get(0);
|
||||
templateService.updateAuditStatus(testTemplate.getTemplateId(), 2, null,null,null);
|
||||
templateService.updateAuditStatus(testTemplate.getTemplateId(), 2, "sss",1111,"depart");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class DynamicRuleServiceTest extends ProtectionApplicationTests {
|
||||
// null,null, 1, 1);
|
||||
// List<Template> templates = templateService.queryTemplates(
|
||||
// null, null, null, null, null,1, 1);
|
||||
for (int i = 0;i<30; i++) {
|
||||
for (int i = 0;i<2; i++) {
|
||||
DynamicRuleObject object = new DynamicRuleObject();
|
||||
object.setDynamicRuleName("动态规则"+i);
|
||||
object.setDescription("动态规则新建测试");
|
||||
|
||||
@@ -48,7 +48,7 @@ class WhiteListServiceTest extends ProtectionApplicationTests {
|
||||
WhiteListObject object = new WhiteListObject();
|
||||
object.setWhiteListName("test");
|
||||
object.setWhiteListSystemName("china");
|
||||
object.setWhiteListIP("1.1.1.1");
|
||||
object.setWhiteListIP("1.1.9.1");
|
||||
object.setWhiteListPort(80);
|
||||
object.setWhiteListUrl("www.baidu.com");
|
||||
object.setWhiteListProtocol("TCP");
|
||||
@@ -86,7 +86,7 @@ class WhiteListServiceTest extends ProtectionApplicationTests {
|
||||
|
||||
@Test
|
||||
void testUpdateWhiteListAuditStatus() {
|
||||
whiteListService.updateWhiteListObjectAuditStatus(7222, 2, "mh", 1, "mmeess");
|
||||
whiteListService.updateWhiteListObjectAuditStatus(7229, 2, "mh2222", 1, "mmee ess");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user