init.sample
This commit is contained in:
parent
024f49fd10
commit
dc5d5aa56d
|
@ -454,6 +454,10 @@ INSERT INTO public.infra_host_port
|
|||
(port, infra_host_ip_id, meta_port_type_id)
|
||||
VALUES
|
||||
(80, 17, 1);
|
||||
INSERT INTO public.infra_host_port
|
||||
(port, infra_host_ip_id, meta_port_type_id)
|
||||
VALUES
|
||||
(22, 19, 1);
|
||||
|
||||
INSERT INTO public.infra_host_application
|
||||
(infra_host_id, "name")
|
||||
|
|
|
@ -7,9 +7,11 @@ import com.loafle.overflow.central.spring.AppConfigTest;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.loafle.overflow.model.infra.Infra;
|
||||
import com.loafle.overflow.model.meta.MetaCrawlerMapping;
|
||||
import com.loafle.overflow.model.sensor.Sensor;
|
||||
import com.loafle.overflow.model.target.Target;
|
||||
import com.loafle.overflow.service.central.infra.InfraService;
|
||||
import com.loafle.overflow.service.central.sensor.SensorService;
|
||||
import com.loafle.overflow.service.central.target.TargetService;
|
||||
import org.junit.Assert;
|
||||
|
@ -38,6 +40,22 @@ public class SensorServiceTest {
|
|||
@Autowired
|
||||
MetaCrawlerMappingDAO metaCrawlerMappingDAO;
|
||||
|
||||
@Autowired
|
||||
InfraService infraService;
|
||||
|
||||
@Test
|
||||
public void registDefault() throws Exception {
|
||||
Long tempInfraID = Long.valueOf(1);
|
||||
Long tempProbeID = Long.valueOf(1);
|
||||
|
||||
Infra infra = this.infraService.read(tempInfraID);
|
||||
List<Long> infraIDs = new ArrayList<>();
|
||||
infraIDs.add(infra.getId());
|
||||
List<Target> targets = this.targetService.registAll(infraIDs, tempProbeID);
|
||||
|
||||
Assert.assertNotNull(this.sensorService.readAllByTargetID(targets.get(0).getId()));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void regist() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue
Block a user