aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md8
-rw-r--r--netconfsimulator/pom.xml9
-rw-r--r--pnfsimulator/integration/pom.xml18
-rw-r--r--pnfsimulator/pom.xml1
-rw-r--r--pom.xml11
-rw-r--r--sanitycheck/README.md32
-rw-r--r--sanitycheck/events/eventToVes.json1
7 files changed, 39 insertions, 41 deletions
diff --git a/README.md b/README.md
index 6c6bb17..3ed2612 100644
--- a/README.md
+++ b/README.md
@@ -12,13 +12,13 @@ Project consists of three submodules:
Detailed information about submodules can be found in ```README.md``` in their directories.
-## Project building
+## Building Docker images
```
-mvn clean package
+mvn clean install -P docker
```
-## Building Docker images
+## Run integration tests
```
-mvn clean package -P docker -DskipTests=true
+mvn verify -P integration
```
##Sanity check
diff --git a/netconfsimulator/pom.xml b/netconfsimulator/pom.xml
index d5f9e67..5502c69 100644
--- a/netconfsimulator/pom.xml
+++ b/netconfsimulator/pom.xml
@@ -48,8 +48,6 @@
<netopeer-saver-build-dir>${project.build.directory}/cmake</netopeer-saver-build-dir>
<netopeer-saver-executable-dir>${netopeer-saver-build-dir}/bin</netopeer-saver-executable-dir>
<proxy>""</proxy>
- <skip-integration-tests>true</skip-integration-tests>
- <skip-unit-tests>false</skip-unit-tests>
<project.build.integrationTestSourceDirectory>${project.basedir}/src/it/java</project.build.integrationTestSourceDirectory>
<build-helper-maven-plugin.version>3.1.0</build-helper-maven-plugin.version>
</properties>
@@ -238,13 +236,6 @@
</build>
<profiles>
<profile>
- <id>integration</id>
- <properties>
- <skip-integration-tests>false</skip-integration-tests>
- <skip-unit-tests>true</skip-unit-tests>
- </properties>
- </profile>
- <profile>
<id>docker</id>
<activation>
<activeByDefault>false</activeByDefault>
diff --git a/pnfsimulator/integration/pom.xml b/pnfsimulator/integration/pom.xml
index 1e895bb..7292849 100644
--- a/pnfsimulator/integration/pom.xml
+++ b/pnfsimulator/integration/pom.xml
@@ -28,9 +28,13 @@
<groupId>org.onap.integration.simulators.pnf-simulator</groupId>
<artifactId>integration-pnf-simulator</artifactId>
<version>1.0.1-SNAPSHOT</version>
+ <relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>pnf-simulator-integration</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ <name>pnf-simulator-integration</name>
+
<repositories>
<repository>
<id>dl.bintray.com</id>
@@ -41,6 +45,8 @@
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
+ <rest-assured.version>3.2.0</rest-assured.version>
+ <mongo-java-driver.version>3.9.1</mongo-java-driver.version>
</properties>
<dependencies>
@@ -48,53 +54,46 @@
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
- <version>3.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
- <version>2.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
- <version>2.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
- <version>3.2.0</version>
+ <version>${rest-assured.version}</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
- <version>3.9.1</version>
+ <version>${mongo-java-driver.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
- <version>5.0.4.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
- <version>2.0.1.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
- <version>2.8.2</version>
</dependency>
<dependency>
<groupId>com.palantir.docker.compose</groupId>
<artifactId>docker-compose-rule-junit4</artifactId>
- <version>0.34.0</version>
</dependency>
</dependencies>
@@ -117,7 +116,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.1</version>
<configuration>
<includes>
<!--Execute only suites from the test folder-->
diff --git a/pnfsimulator/pom.xml b/pnfsimulator/pom.xml
index 6ffe1e1..2f5bab1 100644
--- a/pnfsimulator/pom.xml
+++ b/pnfsimulator/pom.xml
@@ -272,6 +272,7 @@
</dependency>
</dependencies>
<configuration>
+ <skipTests>${skip-unit-tests}</skipTests>
<detail>true</detail>
<printSummary>true</printSummary>
<useSystemClassLoader>false</useSystemClassLoader>
diff --git a/pom.xml b/pom.xml
index e328340..dd40fcd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -100,10 +100,13 @@
<spring.boot.version>2.1.6.RELEASE</spring.boot.version>
<spring.kafka.version>2.2.7.RELEASE</spring.kafka.version>
<before-after-spring-test-runner.version>0.1.0</before-after-spring-test-runner.version>
- <docker-compose-rule-junit4.version>0.29.1</docker-compose-rule-junit4.version>
+ <docker-compose-rule-junit4.version>0.34.0</docker-compose-rule-junit4.version>
<spring-test.version>5.0.4.RELEASE</spring-test.version>
<junit-jupiter-migrationsupport.version>5.1.0</junit-jupiter-migrationsupport.version>
<jsonassert.version>1.5.0</jsonassert.version>
+
+ <skip-integration-tests>true</skip-integration-tests>
+ <skip-unit-tests>false</skip-unit-tests>
</properties>
<dependencyManagement>
@@ -328,10 +331,14 @@
<profiles>
<profile>
- <id>tests</id>
+ <id>integration</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
+ <properties>
+ <skip-integration-tests>false</skip-integration-tests>
+ <skip-unit-tests>true</skip-unit-tests>
+ </properties>
<modules>
<module>pnfsimulator/integration</module>
</modules>
diff --git a/sanitycheck/README.md b/sanitycheck/README.md
index 9fb4929..ad5f3e3 100644
--- a/sanitycheck/README.md
+++ b/sanitycheck/README.md
@@ -14,39 +14,41 @@ You have to change the IP address in file events/vesAddressConfiguration.json
"vesServerUrl": "http://<IP_Address>:8080/eventListener/v7"
}
```
-and in file events/eventToVes.json
-
-```
-{
-"vesServerUrl": "http://<IP_Address>:8080/eventListener/v7",
-"event": { ...
-```
### 1. Build Projects
```
make start
```
-### 2. Send one event
+### 2. Reconfigure ves url
```
-make generate-event
+make reconfigure-ves-url
```
### 2.1 Check dmaap sim
+should return empty list
```
make check-dmaap
```
-### 3. Send few events:
-### 3.1 Reconfigure ves url
+### 3. Send one event
+### 3.1 Send events:
```
-make reconfigure-ves-url
+make generate-event
+```
+### 3.2 Check dmaap sim
+should return list containing 1 event
+```
+make check-dmaap
```
-### 3.2 Send events
+### 4. Send few events:
+### 4.1 Send events
+this will send 4 event with interval 1 second
```
make generate-multiple-events
```
-### 3.3 Check dmaap sim
+### 4.2 Check dmaap sim
+should return list containing 5 event (1 from point 3.1 and 4 from point 4.1)
```
make check-dmaap
```
-### 4. Clear environment
+### 5. Clear environment
```
make stop
```
diff --git a/sanitycheck/events/eventToVes.json b/sanitycheck/events/eventToVes.json
index 7299306..8d37f5a 100644
--- a/sanitycheck/events/eventToVes.json
+++ b/sanitycheck/events/eventToVes.json
@@ -1,5 +1,4 @@
{
- "vesServerUrl": "http://172.17.0.1:8080/eventListener/v7",
"event": {
"event": {
"commonEventHeader": {