Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -57,6 +57,7 @@ public class AlertMessageTest {
|
||||
object.setDynamicRulePriority(1);
|
||||
object.setDynamicRuleRange("北京");
|
||||
object.setDynamicRuleProtectLevel(1);
|
||||
object.setLogRuleId(1L);
|
||||
object.setTemplateId(templates.get(0).getTemplateId());
|
||||
object.setProtectObjectIds(List.of(new Integer[]{protectObject.get(0).getProtectObjectId()}));
|
||||
Integer dynamicRuleId = dynamicRuleService.newDynamicRuleObject(object);
|
||||
@@ -81,7 +82,7 @@ public class AlertMessageTest {
|
||||
//启动任务
|
||||
stateChangeService.changeState(2, taskId, false);
|
||||
|
||||
for (int i = 0 ; i< 10; i++) {
|
||||
for (int i = 0 ; i< 5; i++) {
|
||||
AlertMessage alert = new AlertMessage();
|
||||
FiveTupleWithMask fiveTupleWithMask = new FiveTupleWithMask();
|
||||
fiveTupleWithMask.setSourceIP("111.1.1." + i);
|
||||
|
||||
@@ -8,7 +8,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
@@ -101,7 +103,15 @@ public class StaticRuleServiceTest extends ProtectionApplicationTests {
|
||||
List<StaticRuleObject> staticRuleObjects = staticRuleService.queryStaticRule(null, null, null, null, 1, 10);
|
||||
System.out.println(staticRuleObjects);
|
||||
}
|
||||
@Test
|
||||
void testUpdateStaticRuleAuditStatusBatch(){
|
||||
Map<Integer, Integer> map = new HashMap<>();
|
||||
map.put(1299, 0);
|
||||
map.put(1300, 1);
|
||||
map.put(1301, 1);
|
||||
|
||||
|
||||
System.out.println(staticRuleService.updateAuditStatusBatch(map));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user