aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-flows
diff options
context:
space:
mode:
authorSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-08-08 16:03:53 -0400
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2018-08-08 16:28:29 -0400
commit1db2da2f655d8a72a0622815d7208736a8a5339b (patch)
tree4e7b0c061c21b14bc5698f94548de76d33d12f63 /bpmn/so-bpmn-infrastructure-flows
parent6591ba62c3fcd998836ea1ed844bde03a04a8380 (diff)
Fix Invalid BPMN
Fix invalid BPMN for a 2nd time, add JUNIT to fail verify on invalid BPMN Issue-ID: SO-804 Change-Id: I0ead7d8ebc42dbfe6b18cb29e3962cceb6d7cc23 Change-Id: I0ead7d8ebc42dbfe6b18cb29e3962cceb6d7cc23 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-flows')
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/pom.xml83
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/InfraEmbeddedMariaDbConfig.java72
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java55
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/ValidBPMNTest.java43
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml208
6 files changed, 423 insertions, 40 deletions
diff --git a/bpmn/so-bpmn-infrastructure-flows/pom.xml b/bpmn/so-bpmn-infrastructure-flows/pom.xml
index 529364f7d2..8557cf178e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/pom.xml
+++ b/bpmn/so-bpmn-infrastructure-flows/pom.xml
@@ -73,15 +73,15 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
- <execution>
+ <execution>
<id>default-test</id>
<goals>
<goal>test</goal>
</goals>
- <configuration>
- <includes>
- <include>**/AllTestsTestSuite.java</include>
- </includes>
+ <configuration>
+ <includes>
+ <include>**/AllTestsTestSuite.java</include>
+ </includes>
</configuration>
</execution>
<execution>
@@ -89,23 +89,23 @@
<goals>
<goal>test</goal>
</goals>
- <configuration>
- <includes>
- <include>**/AllTasksTestsTestSuite.java</include>
- </includes>
+ <configuration>
+ <includes>
+ <include>**/AllTasksTestsTestSuite.java</include>
+ </includes>
</configuration>
</execution>
<execution>
- <id>bpmn-test</id>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <includes>
- <include>**/AllBPMNTestSuites.java</include>
- </includes>
- </configuration>
- </execution>
+ <id>bpmn-test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>**/AllBPMNTestSuites.java</include>
+ </includes>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
@@ -134,9 +134,14 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
@@ -156,7 +161,7 @@
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description-swagger</artifactId>
<version>${cxf.version}</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@@ -209,7 +214,7 @@
<version>2.0</version>
</dependency>
<dependency>
- <groupId>org.onap.so</groupId>
+ <groupId>org.onap.so</groupId>
<artifactId>MSORESTClient</artifactId>
<version>${project.version}</version>
</dependency>
@@ -243,17 +248,17 @@
<artifactId>javax.annotation-api</artifactId>
<version>1.3</version>
</dependency>
- <dependency>
- <groupId>org.onap.msb.java-sdk</groupId>
- <artifactId>msb-java-sdk</artifactId>
- <version>1.0.0</version>
- <exclusions>
- <exclusion>
- <groupId>com.eclipsesource.jaxrs</groupId>
- <artifactId>jersey-all</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
+ <dependency>
+ <groupId>org.onap.msb.java-sdk</groupId>
+ <artifactId>msb-java-sdk</artifactId>
+ <version>1.0.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.eclipsesource.jaxrs</groupId>
+ <artifactId>jersey-all</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -271,16 +276,16 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
</dependency>
<dependency>
- <groupId>ch.vorburger.mariaDB4j</groupId>
- <artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
- <scope>test</scope>
- </dependency>
+ <groupId>ch.vorburger.mariaDB4j</groupId>
+ <artifactId>mariaDB4j</artifactId>
+ <version>2.2.3</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
index 0c1fb77639..4b6f8d9b26 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/Delete3rdONAPE2EServiceInstance.bpmn
@@ -155,7 +155,7 @@ dcsi.checkLocallCall(execution)]]></bpmn:script>
<bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1y4vypx" name="GoTo StartLocalONAPDeleteE2ESI">
<bpmn:incoming>SequenceFlow_1y8xkzy</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0h1rnsw</bpmn:incoming>
- <bpmn:linkEventDefinition name=" StartLocalONAPDeleteE2ESI" />
+ <bpmn:linkEventDefinition name="StartLocalONAPDeleteE2ESI" />
</bpmn:intermediateThrowEvent>
<bpmn:endEvent id="EndEvent_0o0n3fa" name="Delete3rdONAPRES_End">
<bpmn:incoming>SequenceFlow_131f1jj</bpmn:incoming>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/InfraEmbeddedMariaDbConfig.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/InfraEmbeddedMariaDbConfig.java
new file mode 100644
index 0000000000..3f1a5eae07
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/InfraEmbeddedMariaDbConfig.java
@@ -0,0 +1,72 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so;
+import ch.vorburger.exec.ManagedProcessException;
+import ch.vorburger.mariadb4j.DBConfigurationBuilder;
+import ch.vorburger.mariadb4j.springframework.MariaDB4jSpringService;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder;
+import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Profile;
+import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
+import org.springframework.orm.jpa.JpaTransactionManager;
+import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+import javax.persistence.EntityManagerFactory;
+import javax.sql.DataSource;
+
+@Configuration
+@EnableTransactionManagement
+@EnableJpaRepositories(
+ entityManagerFactoryRef = "requestEntityManagerFactory",transactionManagerRef = "requestTransactionManager",
+ basePackages = { "org.onap.so.db.request.data.repository"}
+)
+@Profile({"test"})
+public class InfraEmbeddedMariaDbConfig {
+
+ @Primary
+ @Bean(name = "requestEntityManagerFactory")
+ public LocalContainerEntityManagerFactoryBean
+ entityManagerFactory(
+ EntityManagerFactoryBuilder builder,
+ DataSource dataSource
+ ) {
+ return builder
+ .dataSource(dataSource)
+ .packages("org.onap.so.db.request.beans")
+ .persistenceUnit("requestDB")
+ .build();
+ }
+
+ @Bean(name = "requestTransactionManager")
+ public PlatformTransactionManager transactionManager(
+ @Qualifier("requestEntityManagerFactory") EntityManagerFactory
+ entityManagerFactory
+ ) {
+ return new JpaTransactionManager(entityManagerFactory);
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java
new file mode 100644
index 0000000000..314cc0b2de
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java
@@ -0,0 +1,55 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so;
+
+import java.io.IOException;
+
+import javax.annotation.PreDestroy;
+
+import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
+import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
+import org.onap.so.db.request.data.repository.InfraActiveRequestsRepositoryImpl;
+import org.onap.so.requestsdb.RequestsDBHelper;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.ComponentScan.Filter;
+import org.springframework.context.annotation.FilterType;
+import org.springframework.context.annotation.Profile;
+
+import ch.vorburger.mariadb4j.MariaDB4jService;
+
+@SpringBootApplication
+@Profile("test")
+@EnableProcessApplication("MSO CommonBPMN Test Application")
+@ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
+ @Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class),
+ @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = RequestsDBHelper.class),
+ @Filter(type = FilterType.ASSIGNABLE_TYPE, classes = InfraActiveRequestsRepositoryImpl.class) })
+public class TestApplication {
+ public static void main(String... args) {
+ SpringApplication.run(TestApplication.class, args);
+ System.getProperties().setProperty("mso.db", "MARIADB");
+ System.getProperties().setProperty("server.name", "Springboot");
+
+
+ }
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/ValidBPMNTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/ValidBPMNTest.java
new file mode 100644
index 0000000000..0521fa737d
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/ValidBPMNTest.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.cloud.contract.wiremock.AutoConfigureWireMock;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = TestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
+@ActiveProfiles("test")
+@ContextConfiguration
+@AutoConfigureWireMock(port = 0)
+public class ValidBPMNTest {
+
+ @Test
+ public void verifyApplicationStartup(){
+ //Verifys Springboot app can start up and all BPMN's are in fact parsable
+ assert(true);
+ }
+
+}
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml
new file mode 100644
index 0000000000..8a5ade6fb6
--- /dev/null
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml
@@ -0,0 +1,208 @@
+aai:
+ auth: 26AFB797A6A57960D5D718491925C50F77CDC22AC394B3DBA09950D8FD1C0764
+ endpoint: http://localhost:${wiremock.server.port}
+appc:
+ client:
+ key: iaEMAfjsVsZnraBP
+ response:
+ timeout: '120000'
+ secret: wcivUjsjXzmGFBfxMmyJu9dz
+ poolMembers: localhost:3904
+ service: ueb
+ topic:
+ read:
+ name: APPC-TEST-AMDOCS2
+ timeout: '120000'
+ write: APPC-TEST-AMDOCS1-DEV3
+ sdnc:
+ read: SDNC-LCM-READ
+ write: SDNC-LCM-WRITE
+mso:
+ adapters:
+ completemsoprocess:
+ endpoint: http://localhost:${wiremock.server.port}/CompleteMsoProcess
+ db:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ endpoint: http://localhost:${wiremock.server.port}/dbadapters/RequestsDbAdapter
+ spring:
+ endpoint: http://localhost:${wiremock.server.port}
+ network:
+ endpoint: http://localhost:${wiremock.server.port}/networks/NetworkAdapter
+ rest:
+ endpoint: http://localhost:${wiremock.server.port}/networks/rest/v1/networks
+ openecomp:
+ db:
+ endpoint: http://localhost:${wiremock.server.port}/dbadapters/RequestsDbAdapter
+ po:
+ auth: 757A94191D685FD2092AC1490730A4FC
+ password: 3141634BF7E070AA289CF2892C986C0B
+ sdnc:
+ endpoint: http://localhost:${wiremock.server.port}/SDNCAdapter
+ rest:
+ endpoint: http://localhost:${wiremock.server.port}/SDNCAdapter/v1/sdnc
+ timeout: PT60S
+ tenant:
+ endpoint: http://localhost:${wiremock.server.port}/tenantAdapterMock
+ vnf:
+ endpoint: http://localhost:${wiremock.server.port}/vnfs/VnfAdapter
+ rest:
+ endpoint: http://localhost:${wiremock.server.port}/services/rest/v1/vnfs
+ volume-groups:
+ rest:
+ endpoint: http://localhost:${wiremock.server.port}/services/rest/v1/volume-groups
+ vnf-async:
+ endpoint: http://localhost:${wiremock.server.port}/vnfs/VnfAdapterAsync
+ workflow:
+ message:
+ endpoint: http://localhost:${wiremock.server.port}/workflows/messages/message
+
+ async:
+ core-pool-size: 50
+ max-pool-size: 50
+ queue-capacity: 500
+
+ bpmn:
+ optimisticlockingexception:
+ retrycount: '3'
+ callbackRetryAttempts: '5'
+ catalog:
+ db:
+ endpoint: http://localhost:${wiremock.server.port}/
+ spring:
+ endpoint: http://localhost:${wiremock.server.port}
+ correlation:
+ timeout: 60
+ db:
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=
+ default:
+ adapter:
+ namespace: http://org.onap.so
+ healthcheck:
+ log:
+ debug: 'false'
+ infra:
+ customer:
+ id: testCustIdInfra
+ logPath: logs
+ msoKey: 07a7159d3bf51a0e53be7a8f89699be7
+ po:
+ timeout: PT60S
+ request:
+ db:
+ endpoint: http://localhost:${wiremock.server.port}/
+ rollback: 'true'
+ sdnc:
+ password: 3141634BF7E070AA289CF2892C986C0B
+ site-name: localDevEnv
+ workflow:
+ default:
+ aai:
+ cloud-region:
+ version: '9'
+ generic-vnf:
+ version: '9'
+ v8:
+ customer:
+ uri: /aai/v8/business/customers/customer
+ generic-query:
+ uri: /aai/v8/search/generic-query
+ l3-network:
+ uri: /aai/v8/network/l3-networks/l3-network
+ network-policy:
+ uri: /aai/v8/network/network-policies/network-policy
+ nodes-query:
+ uri: /aai/v8/search/nodes-query
+ route-table-reference:
+ uri: /aai/v8/network/route-table-references/route-table-reference
+ tenant:
+ uri: /aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+ vce:
+ uri: /aai/v8/network/vces/vce
+ vpn-binding:
+ uri: /aai/v8/network/vpn-bindings/vpn-binding
+ v9:
+ cloud-region:
+ uri: /aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+ generic-vnf:
+ uri: /aai/v9/network/generic-vnfs/generic-vnf
+ global:
+ default:
+ aai:
+ namespace: http://org.openecomp.aai.inventory/
+ version: '8'
+ message:
+ endpoint: http://localhost:${wiremock.server.port}/mso/WorkflowMesssage
+ notification:
+ name: GenericNotificationService
+ sdncadapter:
+ callback: http://localhost:${wiremock.server.port}/mso/SDNCAdapterCallbackService
+ vnfadapter:
+ create:
+ callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+ delete:
+ callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+ query:
+ callback: http://localhost:${wiremock.server.port}/mso/services/VNFAdapterQuerCallbackV1
+ rollback:
+ callback: http://localhost:${wiremock.server.port}/mso/vnfAdapterNotify
+ global:
+ dmaap:
+ username: dmaapUsername
+ password: dmaapPassword
+ host: http://localhost:28090
+ publisher:
+ topic: com.att.mso.asyncStatusUpdate
+ service-plugin:
+ third-sp-endpoint:
+ oof-calc-endpoint:
+policy:
+ auth: Basic dGVzdHBkcDphbHBoYTEyMw==
+ client:
+ auth: Basic bTAzNzQzOnBvbGljeVIwY2sk
+ endpoint: https://localhost:8081/pdp/api/
+ environment: TEST
+sniro:
+ conductor:
+ enabled: true
+ host: http://localhost:${wiremock.server.port}
+ uri: /v1/release-orders
+ headers.auth: Basic dGVzdDp0ZXN0cHdk
+ manager:
+ timeout: PT30M
+ host: http://localhost:${wiremock.server.port}
+ uri.v1: /sniro/api/v2/placement
+ uri.v2: /sniro/api/placement/v2
+ headers.auth: Basic dGVzdDp0ZXN0cHdk
+ headers.patchVersion: 1
+ headers.minorVersion: 1
+ headers.latestVersion: 2
+spring:
+ datasource:
+ url: jdbc:mariadb://localhost:3307/camundabpmn
+ username: root
+ password: password
+ driver-class-name: org.mariadb.jdbc.Driver
+ initialize: true
+ jpa:
+ generate-ddl: false
+ show-sql: false
+ hibernate:
+ ddl-auto: none
+ naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
+ enable-lazy-load-no-trans: true
+ database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
+ security:
+ usercredentials:
+ -
+ username: test
+ password: '$2a$12$Zi3AuYcZoZO/gBQyUtST2.F5N6HqcTtaNci2Et.ufsQhski56srIu'
+ role: BPEL-Client
+mariaDB4j:
+ dataDir:
+ port: 3307
+ databaseName: camundabpmn
+camunda:
+ bpm:
+ metrics:
+ enabled: false
+ db-reporter-activate: false \ No newline at end of file