diff options
author | Stanislav Marszalek <s.marszalek2@partner.samsung.com> | 2021-07-09 09:41:08 +0200 |
---|---|---|
committer | Stanislav Marszalek <s.marszalek2@partner.samsung.com> | 2021-07-28 13:47:46 +0200 |
commit | 0b06291c6c0c6f8f1e8240c8c6b1175648a177aa (patch) | |
tree | 6a0a50a7836727dbe96259282550679876186219 /src/test | |
parent | de818385611ad0afb133996a4afe5b1b00ab1c57 (diff) |
O1 PM Bulk support - collecting events, basic structure for PM Bulk File creation
Issue-ID: INT-1945
Signed-off-by: Stanislav Marszalek <s.marszalek2@partner.samsung.com>
Change-Id: If08908035719798d8d7b129ddcdb6ef62f1787fe
Diffstat (limited to 'src/test')
4 files changed, 30 insertions, 10 deletions
diff --git a/src/test/java/org/onap/a1pesimulator/service/CellServiceTest.java b/src/test/java/org/onap/a1pesimulator/service/CellServiceTest.java index 5e9dc05..4c05b23 100644 --- a/src/test/java/org/onap/a1pesimulator/service/CellServiceTest.java +++ b/src/test/java/org/onap/a1pesimulator/service/CellServiceTest.java @@ -26,6 +26,7 @@ import static org.onap.a1pesimulator.TestHelpers.checkFirstUserEquipment; import java.util.Collection; import java.util.Set; + import org.junit.Test; import org.junit.runner.RunWith; import org.onap.a1pesimulator.data.Topology; diff --git a/src/test/java/org/onap/a1pesimulator/service/VesBrokerServiceImplTest.java b/src/test/java/org/onap/a1pesimulator/service/VesBrokerServiceImplTest.java index 5b27529..2c2d9ff 100644 --- a/src/test/java/org/onap/a1pesimulator/service/VesBrokerServiceImplTest.java +++ b/src/test/java/org/onap/a1pesimulator/service/VesBrokerServiceImplTest.java @@ -15,19 +15,20 @@ package org.onap.a1pesimulator.service; import static org.mockito.Mockito.when; -import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; + import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentMatchers; import org.mockito.Mock; -import org.onap.a1pesimulator.data.ves.Event; +import org.onap.a1pesimulator.data.ReportingMethodEnum; +import org.onap.a1pesimulator.data.ves.VesEvent; import org.onap.a1pesimulator.service.ves.RanVesBrokerService; import org.onap.a1pesimulator.service.ves.RanVesSender; import org.springframework.beans.factory.annotation.Autowired; @@ -40,6 +41,8 @@ import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.web.client.RestTemplate; +import com.fasterxml.jackson.databind.ObjectMapper; + @RunWith(SpringRunner.class) @SpringBootTest public class VesBrokerServiceImplTest { @@ -68,13 +71,13 @@ public class VesBrokerServiceImplTest { ArgumentMatchers.any(HttpEntity.class), ArgumentMatchers.eq(String.class))).thenReturn(responseEntity); ResponseEntity<String> response = vesBrokerService.startSendingVesEvents("CustomIdentifier", - loadEventFromFile("VesBrokerControllerTest_pm_ves.json"), 10); + loadEventFromFile("VesBrokerControllerTest_pm_ves.json"), 10, ReportingMethodEnum.VES); Assert.assertEquals(HttpStatus.ACCEPTED, response.getStatusCode()); } - private Event loadEventFromFile(String fileName) throws Exception { - return mapper.readValue(loadFileContent(fileName), Event.class); + private VesEvent loadEventFromFile(String fileName) throws Exception { + return mapper.readValue(loadFileContent(fileName), VesEvent.class); } private String loadFileContent(String fileName) throws IOException, URISyntaxException { diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index 97c855b..27d2fda 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -17,16 +17,31 @@ ves.collector.endpoint=/somePath ves.pm.maxPoolSize=10 ves.defaultInterval=10 ves.defaultFailureDuration=120 - ves.failing.throughput=1 ves.failing.latency=500 # in sec ves.failing.checkout.delay=15 - +ftp.server.protocol=sftp +ftp.server.url=localhost +ftp.server.port=22222 +ftp.server.filepath=upload +ftp.server.username=admin +ftp.server.password=samsung topology.cell.config.file=src/test/resources/cells.json topology.cell.range=5 topology.ue.config.file=src/test/resources/ue.json - refresher.fixed.rate.ms=60000 - -restapi.version=v1
\ No newline at end of file +restapi.version=v1 +# PM Bulk File constants +xml.pm.bulk.fileFormatVersion=32.435 V7.0 +xml.pm.bulk.vendorName=Samsung +xml.pm.bulk.userLabel=ORAN PE Sim +xml.pm.bulk.fileSender=ORAN +#File Ready Event constants +file.ready.version=4.0.1 +file.ready.vesEventListenerVersion=7.0.1 +file.ready.domain=notification +file.ready.eventName=stndDefined-PE-Samsung-Notification +file.ready.fileFormatType=org.3GPP.32.435#measCollec +file.ready.fileFormatVersion=V10 +file.ready.notificationFieldsVersion=2.0
\ No newline at end of file diff --git a/src/test/resources/vnf.config b/src/test/resources/vnf.config index 09a2553..dab5ee9 100644 --- a/src/test/resources/vnf.config +++ b/src/test/resources/vnf.config @@ -5,3 +5,4 @@ vesPassword=someVesPassword vnfId=someVnfId vnfName=someVnfName unknownProperty=doNotFail +repPeriod=30
\ No newline at end of file |