Merge "[DMAAP-BC] Avoid Creating duplicate DR Publisher, Subscriber"
authorFiachra Corcoran <fiachra.corcoran@est.tech>
Fri, 28 Jan 2022 15:30:12 +0000 (15:30 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 28 Jan 2022 15:30:12 +0000 (15:30 +0000)
58 files changed:
.gitreview [new file with mode: 0644]
INFO.yaml
csit/scripts/dmaap-message-router/docker-compose/docker-compose.yml
dmaap-bc/pom.xml
dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/aaf/AafConnection.java
dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/server/Main.java
dmaap-bc/src/main/resources/docker/Dockerfile
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/aaf/AafServiceFactoryTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/aaf/AafServiceImplTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/authentication/ApiPermsTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/authentication/ApiPolicyTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/client/DrProvConnectionTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/client/MrProvConnectionTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/client/MrTopicConnectionTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/database/DBFieldHandlerTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/database/DBMapTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/database/DBSingletonTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/database/LoadSchemaTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/database/TableHandlerTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/model/MRClientTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/model/MR_ClusterTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/model/MirrorMakerTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/model/TopicTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/AAFAuthenticationFilterTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/AAFAuthorizationFilterTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/DR_NodeResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/DR_PubResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/DR_SubResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/DcaeLocationResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/DmaapResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/FeedResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/InfoResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/MR_ClientResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/resources/TopicResourceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/server/JettyServerTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/server/MainTest.java [deleted file]
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/AafTopicSetupServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/ApiServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/DR_NodeServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/DmaapServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/Dr_PubServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/FeedServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/MR_ClientServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/MR_ClusterServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/MirrorMakerServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/MirrorMakerServiceTestMockito.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/service/TopicServiceTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/util/DmaapConfigTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/util/GraphTest.java
dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/util/PermissionBuilderTest.java
docs/conf.py
docs/release-notes.rst
docs/requirements-docs.txt
docs/tox.ini
pom.xml
releases/2.0.8.yaml [new file with mode: 0644]
version.properties

diff --git a/.gitreview b/.gitreview
new file mode 100644 (file)
index 0000000..1b82e85
--- /dev/null
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.onap.org
+port=29418
+project=dmaap/buscontroller.git
index 305e833..d37d578 100644 (file)
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -36,11 +36,11 @@ committers:
     company: 'ericsson'
     id: 'efiacor'
     timezone: 'Europe/Dublin'
-  - name: 'Dominic Lunanuova'
-    email: 'dgl@research.att.com'
-    company: 'ATT'
-    id: 'dglFromAtt'
-    timezone: 'America/Dallas'
+  - name: 'David McWeeney'
+    email: 'david.mcweeney@est.tech'
+    company: 'Ericsson Software Technology'
+    id: 'david.mcweeney'
+    timezone: 'Europe/Dublin'
 tsc:
   approval: 'https://lists.onap.org/pipermail/onap-tsc'
   changes:
@@ -62,3 +62,5 @@ tsc:
       name: 'Bhanu Ramesh'
     - type: 'Removal'
       name: 'Mandar Sawant'
+    - type: 'Removal'
+      name: 'Dominic Lunanuova'
index 94765f4..8443dd3 100644 (file)
@@ -1,7 +1,7 @@
 version: '2.1'
 services:
   zookeeper:
-    image: nexus3.onap.org:10001/onap/dmaap/zookeeper:6.0.3
+    image: nexus3.onap.org:10001/onap/dmaap/zookeeper:6.1.0
     container_name: zookeeper
     ports:
       - "2181:2181"
@@ -24,7 +24,7 @@ services:
         - zookeeper
 
   kafka:
-   image: nexus3.onap.org:10001/onap/dmaap/kafka111:1.0.5
+   image: nexus3.onap.org:10001/onap/dmaap/kafka111:1.1.1
    container_name: kafka
    ports:
     - "9092:9092"
@@ -53,7 +53,7 @@ services:
     - zookeeper
 
   dmaap:
-    image: nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.1.20
+    image: nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.3.0
     container_name: dmaap-mr
     ports:
       - "3904:3904"
index 1eeca2a..f4229f6 100644 (file)
       <artifactId>aaf-cadi-aaf</artifactId>
       <version>2.1.7</version>
       <classifier>full</classifier>
+      <exclusions>
+        <exclusion>
+          <artifactId>log4j</artifactId>
+          <groupId>log4j</groupId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
       <groupId>com.fasterxml.jackson.dataformat</groupId>
       <artifactId>jackson-dataformat-yaml</artifactId>
       <version>${jackson.version}</version>
+      <exclusions>
+        <exclusion>
+          <artifactId>snakeyaml</artifactId>
+          <groupId>org.yaml</groupId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>ch.qos.logback</groupId>
       <artifactId>logback-core</artifactId>
-      <version>1.2.3</version>
+      <version>1.2.7</version>
     </dependency>
     <dependency>
       <groupId>ch.qos.logback</groupId>
       <groupId>io.swagger</groupId>
       <artifactId>swagger-jersey2-jaxrs</artifactId>
       <version>${swagger.version}</version>
+      <exclusions>
+        <exclusion>
+          <artifactId>jersey-common</artifactId>
+          <groupId>org.glassfish.jersey.core</groupId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>io.swagger</groupId>
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
       <artifactId>jetty-servlets</artifactId>
-      <version>${jettyVersion}</version>
+      <version>9.4.41.v20210516</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
       <artifactId>jetty-http</artifactId>
-      <version>${jettyVersion}</version>
+      <version>9.4.43.v20210629</version>
       <scope>compile</scope>
     </dependency>
     <!-- https://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-enforcer-plugin</artifactId>
       <version>3.0.0-M3</version>
+      <exclusions>
+        <exclusion>
+          <artifactId>commons-io</artifactId>
+          <groupId>commons-io</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>maven-compat</artifactId>
+          <groupId>org.apache.maven</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>maven-settings</artifactId>
+          <groupId>org.apache.maven</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>maven-shared-utils</artifactId>
+          <groupId>org.apache.maven.shared</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>bsh</artifactId>
+          <groupId>org.beanshell</groupId>
+        </exclusion>
+        <exclusion>
+          <artifactId>maven-core</artifactId>
+          <groupId>org.apache.maven</groupId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>com.att.eelf</groupId>
index 934e541..b476723 100644 (file)
 
 package org.onap.dmaap.dbcapi.aaf;
 
-
-
-
-
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
+import java.net.ConnectException;
 import java.net.ProtocolException;
 import java.net.URL;
 import java.net.UnknownHostException;
-import java.net.ConnectException;
-
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLHandshakeException;
-
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.X509TrustManager;
 import org.apache.commons.codec.binary.Base64;
@@ -50,25 +44,16 @@ import org.onap.dmaap.dbcapi.util.DmaapConfig;
 
 public class AafConnection extends BaseLoggingClass {
 
-
-
-
-
        private String aafCred;
        private String unit_test;
-
-
        private HttpsURLConnection uc;
 
-
        public AafConnection( String cred ) {
                aafCred = cred;
                DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
         unit_test = p.getProperty( "UnitTest", "No" );
-
        }
 
-
        private boolean makeConnection( String pURL ) {
 
                try {
@@ -103,8 +88,6 @@ public class AafConnection extends BaseLoggingClass {
 
                return sb.toString();
        }
-       
-
 
        public int postAaf( AafObject obj, String pURL ) {
                logger.info( "entry: postAaf() to  " + pURL  );
index 942fe6c..91f7df4 100644 (file)
@@ -47,7 +47,7 @@ public class Main extends BaseLoggingClass {
        public void setProvFQDN(String provFQDN) {
                Main.provFQDN = provFQDN;
        }
-       private Main() {
+       Main() {
     }
     public static void main(String[] args) {
         (new Main()).main();
index a801896..f9c913f 100644 (file)
@@ -27,7 +27,7 @@ WORKDIR /opt/app/dmaapbc
 
 COPY /opt /opt
 USER root
-RUN apk add --no-cache curl jq net-tools wget procps \
+RUN apk add --no-cache curl jq net-tools procps \
 
 &&  mkdir -p /opt/app/osaaf && \
     chmod +x bin/* && \
index 45ff2b1..633742f 100644 (file)
 
 package org.onap.dmaap.dbcapi.aaf;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.BDDMockito.given;
+
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -28,10 +33,6 @@ import org.mockito.runners.MockitoJUnitRunner;
 import org.onap.dmaap.dbcapi.aaf.AafService.ServiceType;
 import org.onap.dmaap.dbcapi.util.DmaapConfig;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-
 @RunWith(MockitoJUnitRunner.class)
 public class AafServiceFactoryTest {
 
@@ -45,6 +46,11 @@ public class AafServiceFactoryTest {
     private DmaapConfig dmaapConfig;
     private AafServiceFactory aafServiceFactory;
 
+    @BeforeClass
+    public static void setUpClass() {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+    }
+
     @Before
     public void setUp() throws Exception {
         aafServiceFactory = new AafServiceFactory(dmaapConfig);
index ffd130e..03d19cb 100644 (file)
@@ -50,6 +50,7 @@ public class AafServiceImplTest {
 
     @Before
     public void setUp() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         MockitoAnnotations.initMocks(this);
         given(aafConnection.postAaf(any(AafObject.class), anyString())).willReturn(CREATED);
         given(aafConnection.delAaf(any(AafObject.class), anyString())).willReturn(OK);
@@ -58,7 +59,6 @@ public class AafServiceImplTest {
 
     @Test
     public void shouldReturnCorrectIdentity() {
-
         assertEquals(IDENTITY, aafService.getIdentity());
     }
 
index ea749ce..0c905fe 100644 (file)
@@ -25,13 +25,17 @@ import static org.junit.Assert.assertTrue;
 import javax.ws.rs.core.Application;
 import org.glassfish.jersey.server.ResourceConfig;
 import org.glassfish.jersey.test.JerseyTest;
+import org.junit.Before;
 import org.junit.Test;
 
-import org.onap.dmaap.dbcapi.authentication.ApiPerms;
-
 
 public class ApiPermsTest extends JerseyTest {
 
+       @Before
+       public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+       }
+
        @Override
        protected Application configure() {
                return new ResourceConfig()
index 7b9fbb3..19a8efa 100644 (file)
 
 package org.onap.dmaap.dbcapi.authentication;
 
-import org.junit.Test;
-import org.onap.dmaap.dbcapi.aaf.DmaapPerm;
-
-import java.util.Properties;
-
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
+import java.util.Properties;
+import org.junit.Before;
+import org.junit.Test;
+import org.onap.dmaap.dbcapi.aaf.DmaapPerm;
+
 public class ApiPolicyTest {
 
     private Properties properties = new Properties();
     private ApiPolicy apiPolicy;
 
+    @Before
+    public void setUp() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+    }
+
     @Test
     public void check_shouldExecuteAuthorizationApi() throws Exception {
         properties.put("ApiPermission.Class", "org.onap.dmaap.dbcapi.authentication.ApiPolicyTest$DummyApiAuthorization");
index 4c44e0a..1b38838 100644 (file)
@@ -53,6 +53,7 @@ public class DrProvConnectionTest {
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ns = new DrProvConnection();
        }
 
@@ -63,16 +64,13 @@ public class DrProvConnectionTest {
 
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.DrProvConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" ); 
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.client.DrProvConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
-               rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.DrProvConnection", "set", v );
+               rh.reflect( "org.onap.dmaap.dbcapi.client.DrProvConnection", "set", v );
 
        }
 
index 0614cf9..121a3d7 100644 (file)
@@ -47,6 +47,7 @@ public class MrProvConnectionTest {
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ns = new MrProvConnection();
                ts = new TopicService();
                mcs = new MR_ClusterService();
@@ -61,14 +62,14 @@ public class MrProvConnectionTest {
        public void test1() {
 
 
-               rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrProvConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" ); 
+               rh.reflect( "org.onap.dmaap.dbcapi.client.MrProvConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" );
        
        }
 
        @Test
        public void test2() {
                String v = "Validate";
-               rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrProvConnection", "set", v );
+               rh.reflect( "org.onap.dmaap.dbcapi.client.MrProvConnection", "set", v );
 
        }
 
index af33ec6..f235feb 100644 (file)
@@ -46,6 +46,7 @@ public class MrTopicConnectionTest {
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ns = new MrTopicConnection( "aUser", "aPwd" );
                ts = new TopicService();
                mcs = new MR_ClusterService();
@@ -60,14 +61,14 @@ public class MrTopicConnectionTest {
        public void test1() {
 
 
-               rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrTopicConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" );        
+               rh.reflect( "org.onap.dmaap.dbcapi.client.MrTopicConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" );
        
        }
 
        @Test
        public void test2() {
                String v = "Validate";
-               rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrTopicConnection", "set", v );
+               rh.reflect( "org.onap.dmaap.dbcapi.client.MrTopicConnection", "set", v );
 
        }
 
index f68b9ed..547c3b6 100644 (file)
@@ -25,49 +25,11 @@ package org.onap.dmaap.dbcapi.database;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
 
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.logging.BaseLoggingClass;
-import org.onap.dmaap.dbcapi.model.ReplicationType;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class DBFieldHandlerTest extends BaseLoggingClass {
 
-    private static final String fmt = "%24s: %s%n";
-
-    ReflectionHarness rh = new ReflectionHarness();
-
-    private static class TopicReplicationTypeHandler implements DBFieldHandler.SqlOp {
-        public Object get(ResultSet rs, int index) throws Exception {
-            int val = rs.getInt(index);
-
-            return (ReplicationType.valueOf(val));
-        }
-
-        public void set(PreparedStatement ps, int index, Object val) throws Exception {
-            if (val == null) {
-                ps.setInt(index, 0);
-                return;
-            }
-            @SuppressWarnings("unchecked")
-            ReplicationType rep = (ReplicationType) val;
-            ps.setInt(index, rep.getValue());
-        }
-    }
-
-    @Test
-    public void test1() {
-        // rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrTopicConnection", "get",
-        // "idNotSet@namespaceNotSet:pwdNotSet" );
-    }
-
-    @Test
-    public void test2() {
-        String v = "Validate";
-        // rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrTopicConnection", "set", v );
-    }
-
     @Test
     public void test3() {
         try {
index abd4aee..968a48c 100644 (file)
  */
 package org.onap.dmaap.dbcapi.database;
 
-import org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-import org.onap.dmaap.dbcapi.util.Singleton;
-
-import org.junit.After;
+import java.util.Map;
 import org.junit.Before;
 import org.junit.Test;
-import java.util.*;
+import org.onap.dmaap.dbcapi.model.DcaeLocation;
+import org.onap.dmaap.dbcapi.model.Dmaap;
+import org.onap.dmaap.dbcapi.util.Singleton;
 
 public class DBMapTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
-       ReflectionHarness rh = new ReflectionHarness();
-
-
     private static Singleton<Dmaap> dmaap;
     private static Map<String, DcaeLocation> dcaeLocations;
 
-
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void test1() {
-
-
-               //rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrTopicConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" );      
-       
-       }
-
-       @Test
-       public void test2() {
-               String v = "Validate";
-               //rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrTopicConnection", "set", v );
-
-       }
-
-       @Test
-       public void test3() {
                try {
-                dmaap = new DBSingleton<Dmaap>(Dmaap.class, "dmaap");
+                dmaap = new DBSingleton<>(Dmaap.class, "dmaap");
                                Dmaap nd = new Dmaap.DmaapBuilder().createDmaap();
                                dmaap.update(nd);
                } catch (Exception e ) {
                }
                try {
-                dcaeLocations = new DBMap<DcaeLocation>(DcaeLocation.class, "dcae_location", "dcae_location_name");
+                dcaeLocations = new DBMap<>(DcaeLocation.class, "dcae_location", "dcae_location_name");
                } catch (Exception e ) {
                }
-
        }
-
-
-
 }
 
index 003f250..ce2a848 100644 (file)
  */
 package org.onap.dmaap.dbcapi.database;
 
-import org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.onap.dmaap.dbcapi.model.Dmaap;
 
 public class DBSingletonTest {
-
-       private static final String  fmt = "%24s: %s%n";
-
-       ReflectionHarness rh = new ReflectionHarness();
-
-
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
-
        @Test
        public void test3() {
 
                try {
-                       DBSingleton<Dmaap> dmaap = new DBSingleton<Dmaap>(Dmaap.class, "dmaap");
+                       DBSingleton<Dmaap> dmaap = new DBSingleton<>(Dmaap.class, "dmaap");
                        Dmaap d = new Dmaap.DmaapBuilder().createDmaap();
                        dmaap.init( d );
                        d = dmaap.get();
@@ -57,11 +43,6 @@ public class DBSingletonTest {
                        dmaap.remove();
                } catch (Exception e ) {
                }
-
        }
-
-
-
-
 }
 
index 99065d3..14ad2af 100644 (file)
  */
 package org.onap.dmaap.dbcapi.database;
 
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class LoadSchemaTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
-       LoadSchema ls;
-
-
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void test1() {
-
-
                rh.reflect( "org.onap.dmaap.dbcapi.database.LoadSchema", "get", "idNotSet@namespaceNotSet:pwdNotSet" );
-       
        }
 
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.database.LoadSchema", "set", v );
-
        }
 
        @Test
index 978f3ad..b497547 100644 (file)
  */
 package org.onap.dmaap.dbcapi.database;
 
-import org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
-
-import org.junit.After;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
 import org.junit.Before;
 import org.junit.Test;
-import java.sql.*;
+import org.onap.dmaap.dbcapi.model.ReplicationType;
+import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class TableHandlerTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
    private static class TopicReplicationTypeHandler implements DBFieldHandler.SqlOp {
@@ -52,30 +47,20 @@ public class TableHandlerTest {
         }
     }
 
-
-
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrTopicConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" );        
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.client.MrTopicConnection", "get", "idNotSet@namespaceNotSet:pwdNotSet" );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
-               //rh.reflect( "org.onap.dmaap.dbcapi.aaf.client.MrTopicConnection", "set", v );
-
+               rh.reflect( "org.onap.dmaap.dbcapi.client.MrTopicConnection", "set", v );
        }
 
        @Test
@@ -99,8 +84,5 @@ public class TableHandlerTest {
                }
 
        }
-
-
-
 }
 
index ba95a85..f6027a8 100644 (file)
 
 package org.onap.dmaap.dbcapi.model;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class MRClientTest {
 
-    private static final String fmt = "%24s: %s%n";
-
     ReflectionHarness rh = new ReflectionHarness();
 
     String d, t, f, c, m;
 
     @Before
     public void setUp() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         d = "central-onap";
         t = "org.onap.dmaap.interestingTopic";
         f = "mrc.onap.org:3904/events/org.onap.dmaap.interestingTopic";
@@ -46,13 +45,8 @@ public class MRClientTest {
         m = "m12345";
     }
 
-    @After
-    public void tearDown() throws Exception {
-    }
-
     @Test
     public void test1() {
-
         // can't use simple reflection to test for null since null constructor
         // initializes some fields.
         // rh.reflect( "org.onap.dmaap.dbcapi.model.MR_Client", "get", null );
@@ -84,7 +78,6 @@ public class MRClientTest {
 
     @Test
     public void test3() {
-
         String v = "Validate";
         rh.reflect("org.onap.dmaap.dbcapi.model.MR_Client", "set", v);
     }
@@ -105,7 +98,6 @@ public class MRClientTest {
         assertEquals(false, mrClient.isPublisher());
         assertEquals(false, mrClient.isSubscriber());
         assertEquals("test", mrClient.getAction()[0]);
-
     }
 
 }
index 2200627..fe0ca85 100644 (file)
@@ -19,9 +19,8 @@
  */
 package org.onap.dmaap.dbcapi.model;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
 
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
@@ -32,6 +31,7 @@ public class MR_ClusterTest {
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                d = "central-onap";
                fqdn = "mr.onap.org";
                repGrp = "zeppelin";
@@ -44,14 +44,8 @@ public class MR_ClusterTest {
                
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void testMR_ClusterClassDefaultConstructor() {
-
                MR_Cluster t = new MR_Cluster();
        
                assertTrue( t.getDcaeLocationName() == null  );
@@ -120,16 +114,10 @@ public class MR_ClusterTest {
                assertTrue(fqtn.contains(topic2));
        }
 
-
-
        @Test
        public void testsetter() {
-
                String v = "validate";
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.model.MR_Cluster", "set", v );       
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.model.MR_Cluster", "set", v );
        }
 
 }
index 39de2be..872c4b7 100644 (file)
  */
 package org.onap.dmaap.dbcapi.model;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
 
-import org.junit.After;
+import java.util.ArrayList;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
-import java.util.ArrayList;
-
 
 public class MirrorMakerTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
-
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.model.MirrorMaker", "get", null );   
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.model.MirrorMaker", "get", null );
        }
        @Test
        public void test2() {
-
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.model.MirrorMaker", "set", v );
        }
index 5da3aed..d7598b0 100644 (file)
@@ -24,7 +24,6 @@ package org.onap.dmaap.dbcapi.model;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.model.DmaapObject.DmaapObject_Status;
@@ -38,6 +37,7 @@ public class TopicTest {
 
     @Before
     public void setUp() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         f = "org.onap.dmaap.interestingTopic";
         t = "interestingTopic";
         d = "A so very interesting topic";
@@ -45,10 +45,6 @@ public class TopicTest {
         o = "m12345";
     }
 
-    @After
-    public void tearDown() throws Exception {
-    }
-
     @Test
     public void test1() {
         rh.reflect("org.onap.dmaap.dbcapi.model.Topic", "get", null);
index 76fe914..e3f61c7 100644 (file)
  */
 package org.onap.dmaap.dbcapi.resources;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.anyString;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
 import static org.mockito.Mockito.verifyZeroInteractions;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
 import javax.servlet.FilterChain;
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -70,6 +65,11 @@ public class AAFAuthenticationFilterTest {
     @Rule
     public ExpectedException thrown = ExpectedException.none();
 
+    @BeforeClass
+    public static void setUpClass(){
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+    }
+
     @Before
     public void setUp() throws Exception {
         doReturn(dmaapConfig).when(filter).getConfig();
@@ -131,65 +131,4 @@ public class AAFAuthenticationFilterTest {
         //when
         filter.init(filterConfig);
     }
-
-  /*
-   * See https://jira.onap.org/browse/DMAAP-1361  for why this is commented out
-    @Test
-    public void init_shouldInitializeCADI_whenAafIsUsed_andValidCadiPropertiesSet() throws Exception {
-        //given
-        doReturn("true").when(dmaapConfig).getProperty(eq(AAFAuthenticationFilter.CADI_AUTHN_FLAG), anyString());
-        doReturn("src/test/resources/cadi.properties").when(dmaapConfig).getProperty(AAFAuthenticationFilter.CADI_PROPERTIES);
-
-        //when
-        filter.init(filterConfig);
-
-        //then
-        assertTrue(filter.isCadiEnabled());
-        assertNotNull(filter.getCadiFilter());
-    }
-
-    @Test
-    public void doFilter_shouldUseCADIfilter_andAuthenticateUser_whenAAFisUsed_andUserIsValid() throws Exception{
-        //given
-        initCADIFilter();
-        doReturn(200).when(servletResponse).getStatus();
-
-        //when
-        filter.doFilter(servletRequest,servletResponse,filterChain);
-
-        //then
-        verify(cadiFilterMock).doFilter(servletRequest,servletResponse,filterChain);
-        verify(servletResponse).getStatus();
-        verifyNoMoreInteractions(servletResponse);
-        verifyZeroInteractions(filterChain, servletRequest);
-    }
-
-    @Test
-    public void doFilter_shouldUseCADIfilter_andReturnAuthenticationError_whenAAFisUsed_andUserInvalid() throws Exception{
-        //given
-        String errorResponseJson = "{\"code\":401,\"message\":\"invalid or no credentials provided\",\"fields\":\"Authentication\",\"2xx\":false}";
-        initCADIFilter();
-        doReturn(401).when(servletResponse).getStatus();
-        StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter(sw);
-        doReturn(pw).when(servletResponse).getWriter();
-
-        //when
-        filter.doFilter(servletRequest,servletResponse,filterChain);
-
-        //then
-        verify(cadiFilterMock).doFilter(servletRequest,servletResponse,filterChain);
-        verify(servletResponse).getStatus();
-        verify(servletResponse).setContentType("application/json");
-        verifyZeroInteractions(filterChain, servletRequest);
-        assertEquals(errorResponseJson, sw.toString());
-    }
-
-    private void initCADIFilter() throws Exception{
-        doReturn("true").when(dmaapConfig).getProperty(eq(AAFAuthenticationFilter.CADI_AUTHN_FLAG), anyString());
-        doReturn("src/test/resources/cadi.properties").when(dmaapConfig).getProperty(AAFAuthenticationFilter.CADI_PROPERTIES);
-        filter.init(filterConfig);
-        filter.setCadiFilter(cadiFilterMock);
-    }
-*/
 }
\ No newline at end of file
index ba11b01..c58c6fe 100644 (file)
@@ -39,6 +39,7 @@ import javax.servlet.FilterConfig;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -69,6 +70,10 @@ public class AAFAuthorizationFilterTest {
     @Mock
     private DmaapService dmaapService;
 
+    @BeforeClass
+    public static void setUpClass(){
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+    }
     @Before
     public void setUp() throws Exception {
         filter.setPermissionBuilder(permissionBuilder);
index f131d8f..ed3d087 100644 (file)
  */
 package org.onap.dmaap.dbcapi.resources;
 
+import static javax.ws.rs.client.Entity.entity;
+import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.Response;
 import org.glassfish.jersey.server.ResourceConfig;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -29,15 +37,6 @@ import org.onap.dmaap.dbcapi.model.ApiError;
 import org.onap.dmaap.dbcapi.model.DR_Node;
 import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
 
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.Response;
-
-import static javax.ws.rs.client.Entity.entity;
-import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
 
 public class DR_NodeResourceTest {
 
@@ -46,6 +45,7 @@ public class DR_NodeResourceTest {
 
     @BeforeClass
     public static void setUpClass() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         DatabaseClass.getDmaap().init(DMAAP_OBJECT_FACTORY.genDmaap());
 
         testContainer = new FastJerseyTestContainer(new ResourceConfig()
index 340f362..f0f55d8 100644 (file)
@@ -53,6 +53,7 @@ public class DR_PubResourceTest {
 
     @BeforeClass
     public static void setUpClass() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         //TODO: init is still needed here to assure that dmaap is not null
         DatabaseClass.getDmaap().init(DMAAP_OBJECT_FACTORY.genDmaap());
 
index 13b89ea..319e952 100644 (file)
@@ -54,6 +54,7 @@ public class DR_SubResourceTest {
 
     @BeforeClass
     public static void setUpClass() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         //TODO: init is still needed here to assure that dmaap is not null
         DatabaseClass.getDmaap().init(DMAAP_OBJECT_FACTORY.genDmaap());
 
index ff07927..20023e4 100644 (file)
  */
 package org.onap.dmaap.dbcapi.resources;
 
-import org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
-
-import static org.junit.Assert.*;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import static org.junit.Assert.assertTrue;
 
-import org.glassfish.jersey.test.JerseyTest;
-import org.glassfish.jersey.server.ResourceConfig;
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.core.Application;
-import javax.ws.rs.core.Response;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.Path;
-import javax.ws.rs.GET;
+import javax.ws.rs.core.Response;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.test.JerseyTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.dmaap.dbcapi.model.DcaeLocation;
+import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
 
 
 public class DcaeLocationResourceTest extends JerseyTest {
@@ -47,21 +42,10 @@ public class DcaeLocationResourceTest extends JerseyTest {
                return new ResourceConfig( DcaeLocationResource.class );
        }
 
-       private static final String  fmt = "%24s: %s%n";
-
-
-
-/*  may conflict with test framework! 
-       @Before
-       public void setUp() throws Exception {
-       }
-
-       @After
-       public void tearDown() throws Exception {
+       @BeforeClass
+       public static void setUpClass(){
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
        }
-*/
-
-
 
        @Test
        public void GetTest() {
@@ -122,8 +106,5 @@ public class DcaeLocationResourceTest extends JerseyTest {
                System.out.println( "DELETE dcaeLocation resp=" + resp.getStatus() + " " + resp.readEntity( String.class ) );
                assertTrue( resp.getStatus() == 204 );
        }
-
-
-
 }
 
index 29ccb40..70acac3 100644 (file)
@@ -27,6 +27,7 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 import org.glassfish.jersey.server.ResourceConfig;
 import org.glassfish.jersey.test.JerseyTest;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.model.Dmaap;
 import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
@@ -36,28 +37,16 @@ public class DmaapResourceTest extends JerseyTest {
 
        static DmaapObjectFactory factory = new DmaapObjectFactory();
 
+       @BeforeClass
+       public static void setUpClass(){
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+       }
+
        @Override
        protected Application configure() {
                return new ResourceConfig( DmaapResource.class );
-               //return new ResourceConfig( HelloResource.class );
        }
 
-       private static final String  fmt = "%24s: %s%n";
-
-
-
-/*  may conflict with test framework! 
-       @Before
-       public void setUp() throws Exception {
-       }
-
-       @After
-       public void tearDown() throws Exception {
-       }
-*/
-
-
-
        @Test
        public void GetTest() {
                Response resp = target( "dmaap").request().get( Response.class );
index 89dca8a..c15d8ae 100644 (file)
  * ============LICENSE_END=========================================================
  */
 package org.onap.dmaap.dbcapi.resources;
-import org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.service.*;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import java.util.*;
-import java.sql.*;
-
-import org.glassfish.jersey.test.JerseyTest;
-import org.glassfish.jersey.server.ResourceConfig;
 import javax.ws.rs.client.Entity;
 import javax.ws.rs.core.Application;
-import javax.ws.rs.core.Response;
 import javax.ws.rs.core.MediaType;
-import javax.ws.rs.Path;
-import javax.ws.rs.GET;
+import javax.ws.rs.core.Response;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.test.JerseyTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.dmaap.dbcapi.model.Feed;
 
 
 public class FeedResourceTest extends JerseyTest {
 
+       @BeforeClass
+       public static void setUpClass(){
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+       }
        @Override
        protected Application configure() {
                return new ResourceConfig( FeedResource.class );
        }
 
-       private static final String  fmt = "%24s: %s%n";
-
-
-
-/*  may conflict with test framework! 
-       @Before
-       public void setUp() throws Exception {
-       }
-
-       @After
-       public void tearDown() throws Exception {
-       }
-*/
-
-
-
        @Test
        public void GetTest() {
                Response resp = target( "feeds").request().get( Response.class );
@@ -77,28 +58,5 @@ public class FeedResourceTest extends JerseyTest {
                assertTrue( resp.getStatus() == 200 );
        }
 
-/*
-       @Test
-       public void PutTest() {
-               
-               Feed feed = new Feed( "aPutTest", "1.0", "a unit test", "dgl", "unrestricted" );
-               Entity<Feed> reqEntity = Entity.entity( feed, MediaType.APPLICATION_JSON );
-               Response resp = target( "feeds").request().post( reqEntity, Response.class );
-               System.out.println( "POST feed resp=" + resp.getStatus() );
-               String postResp = resp.readEntity( String.class );
-               System.out.println( "postResp=" + postResp );
-               Feed rFeed = new Feed( postResp );  getting a null pointer here
-               rFeed.setSuspended( true );
-               String target = new String ("feeds/" + rFeed.getFeedId() );
-               System.out.println( "PUT feed target=" + target );
-               reqEntity = Entity.entity( rFeed, MediaType.APPLICATION_JSON );
-               resp = target( target ).request().put( reqEntity, Response.class );
-               System.out.println( "PUT feed resp=" + resp.getStatus() );
-               assertTrue( resp.getStatus() == 200 );
-       }
-*/
-
-
-
 }
 
index 3f57f58..57a9699 100644 (file)
  * ============LICENSE_END=========================================================
  */
 package org.onap.dmaap.dbcapi.resources;
-import org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.service.*;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
 
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import java.util.*;
-import java.sql.*;
-
-import org.glassfish.jersey.test.JerseyTest;
-import org.glassfish.jersey.server.ResourceConfig;
-import javax.ws.rs.client.Entity;
 import javax.ws.rs.core.Application;
 import javax.ws.rs.core.Response;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.Path;
-import javax.ws.rs.GET;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.test.JerseyTest;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 
 public class InfoResourceTest extends JerseyTest {
@@ -44,23 +34,11 @@ public class InfoResourceTest extends JerseyTest {
        protected Application configure() {
                return new ResourceConfig( InfoResource.class );
        }
-
-       private static final String  fmt = "%24s: %s%n";
-
-
-
-/*  may conflict with test framework! 
-       @Before
-       public void setUp() throws Exception {
+       @BeforeClass
+       public static void setUpClass(){
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-*/
-
-
-
        @Test
        public void GetTest() {
                Response resp = target( "info").request().get( Response.class );
index abe2e45..bbd4dd0 100644 (file)
 
 package org.onap.dmaap.dbcapi.resources;
 
+import static javax.ws.rs.client.Entity.entity;
+import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.Response;
 import org.glassfish.jersey.server.ResourceConfig;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -31,15 +39,6 @@ import org.onap.dmaap.dbcapi.model.MR_Cluster;
 import org.onap.dmaap.dbcapi.model.Topic;
 import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
 
-import javax.ws.rs.client.Entity;
-import javax.ws.rs.core.Response;
-
-import static javax.ws.rs.client.Entity.entity;
-import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
 public class MR_ClientResourceTest {
 
     private static final DmaapObjectFactory DMAAP_OBJECT_FACTORY = new DmaapObjectFactory();
@@ -47,6 +46,7 @@ public class MR_ClientResourceTest {
 
     @BeforeClass
     public static void setUpClass() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         DatabaseClass.getDmaap().init(DMAAP_OBJECT_FACTORY.genDmaap());
 
         testContainer = new FastJerseyTestContainer(new ResourceConfig()
index 9027f13..b97d3a1 100644 (file)
@@ -50,6 +50,7 @@ public class MR_ClusterResourceTest {
 
        @BeforeClass
        public static void setUpClass() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                DatabaseClass.getDmaap().init(DMAAP_OBJECT_FACTORY.genDmaap());
 
                testContainer = new FastJerseyTestContainer(new ResourceConfig()
index 5b7c46d..7c82711 100644 (file)
@@ -54,6 +54,7 @@ public class TopicResourceTest {
 
     @BeforeClass
     public static void setUpClass() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         //TODO: init is still needed here to assure that dmaap is not null
         DatabaseClass.getDmaap().init(DMAAP_OBJECT_FACTORY.genDmaap());
 
index 35c9243..0582b32 100644 (file)
  */
 package org.onap.dmaap.dbcapi.server;
 
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-import org.onap.dmaap.dbcapi.util.DmaapConfig;
-import static org.junit.Assert.*;
-
+import java.util.Properties;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import java.util.Properties;
+import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
+import org.onap.dmaap.dbcapi.util.DmaapConfig;
 
 public class JettyServerTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
-
-
-               JettyServer m = null;
+       JettyServer m = null;
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                Properties p = DmaapConfig.getConfig();
                try {
                        m = new JettyServer(p);
@@ -54,26 +49,15 @@ public class JettyServerTest {
                }
        }
 
-
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.server.JettyServer", "get", null );  
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.server.JettyServer", "get", null );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.server.JettyServer", "set", v );
-
        }
 
-       @Test
-       public void test3() {
-       }
-
-
-
 }
diff --git a/dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/server/MainTest.java b/dmaap-bc/src/test/java/org/onap/dmaap/dbcapi/server/MainTest.java
deleted file mode 100644 (file)
index 0e74f45..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.onap.dmaap
- * ================================================================================
- * Copyright (C) 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.dmaap.dbcapi.server;
-
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class MainTest {
-
-       private static final String  fmt = "%24s: %s%n";
-
-       ReflectionHarness rh = new ReflectionHarness();
-
-       Main m;
-
-
-       @Before
-       public void setUp() throws Exception {
-               //m = new Main();
-       }
-
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
-       @Test
-       public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.server.Main", "get", null ); 
-       
-       }
-
-       @Test
-       public void test2() {
-               String v = "Validate";
-               rh.reflect( "org.onap.dmaap.dbcapi.server.Main", "set", v );
-
-       }
-
-/*
-       @Test
-       public void test3() {
-               String[] args = { "--help", "--version" };
-
-               try {
-                       m.main( args );
-               } catch (Exception e ) {
-               }
-
-       }
-*/
-
-
-
-}
index 0ca406a..aaac537 100644 (file)
  */
 package org.onap.dmaap.dbcapi.service;
 
+import static com.google.common.collect.Lists.newArrayList;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.BDDMockito.given;
+
+import java.util.List;
 import junitparams.JUnitParamsRunner;
 import junitparams.Parameters;
 import org.junit.Before;
@@ -37,14 +44,6 @@ import org.onap.dmaap.dbcapi.model.Dmaap;
 import org.onap.dmaap.dbcapi.model.Topic;
 import org.onap.dmaap.dbcapi.util.DmaapConfig;
 
-import java.util.List;
-
-import static com.google.common.collect.Lists.newArrayList;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.BDDMockito.given;
-
 @RunWith(JUnitParamsRunner.class)
 public class AafTopicSetupServiceTest {
 
@@ -65,6 +64,7 @@ public class AafTopicSetupServiceTest {
 
     @Before
     public void setUp() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
         MockitoAnnotations.initMocks(this);
         Dmaap dmaap = new Dmaap();
         dmaap.setTopicNsRoot(TOPIC_NS_ROOT);
index c860e55..ae1e427 100644 (file)
@@ -27,14 +27,13 @@ import org.junit.Test;
 
 public class ApiServiceTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
        ApiService ds;
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ds = new ApiService();
        }
 
@@ -42,15 +41,6 @@ public class ApiServiceTest {
        public void tearDown() throws Exception {
        }
 
-
-       @Test
-       public void test1() {
-
-
-               //rh.reflect( "org.onap.dmaap.dbcapi.service.ApiService", "get", null );
-
-       }
-
        @Test
        public void test2() {
                String v = "Validate";
index 307d5b5..512365e 100644 (file)
  */
 package org.onap.dmaap.dbcapi.service;
 
-import  org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
-
+import java.util.List;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import java.util.List;
+import org.onap.dmaap.dbcapi.model.ApiError;
+import org.onap.dmaap.dbcapi.model.DR_Node;
+import org.onap.dmaap.dbcapi.model.DcaeLocation;
+import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
+import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class DR_NodeServiceTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
        static DmaapObjectFactory factory = new DmaapObjectFactory();
 
@@ -41,6 +38,7 @@ public class DR_NodeServiceTest {
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ns = new DR_NodeService();
        }
 
@@ -51,17 +49,13 @@ public class DR_NodeServiceTest {
 
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.service.DR_NodeService", "get", null );      
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.service.DR_NodeService", "get", null );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.service.DR_NodeService", "set", v );
-
        }
 
        @Test
@@ -88,9 +82,6 @@ public class DR_NodeServiceTest {
                }
 
                n2 = ns.removeDr_Node( f,  err );
-                               
 
        }
-
-
 }
index b8b660f..5b96f29 100644 (file)
@@ -19,7 +19,6 @@
  */
 package org.onap.dmaap.dbcapi.service;
 
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.model.Dmaap;
@@ -27,35 +26,20 @@ import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class DmaapServiceTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
        DmaapService ds;
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ds = new DmaapService();
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
-       @Test
-       public void test1() {
-
-
-               //rh.reflect( "org.onap.dmaap.dbcapi.service.DmaapService", "get", null );      
-       
-       }
-
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.service.DmaapService", "set", v );
-
        }
 
        @Test
index 2cfe475..90e1024 100644 (file)
  */
 package org.onap.dmaap.dbcapi.service;
 
-import  org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
 
-import org.junit.After;
+import java.util.ArrayList;
+import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
-import java.util.List;
-import java.util.ArrayList;
+import org.onap.dmaap.dbcapi.model.ApiError;
+import org.onap.dmaap.dbcapi.model.DR_Pub;
+import org.onap.dmaap.dbcapi.model.DcaeLocation;
+import org.onap.dmaap.dbcapi.model.Feed;
+import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class Dr_PubServiceTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
        DR_PubService ns;
@@ -41,28 +40,21 @@ public class Dr_PubServiceTest {
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ns = new DR_PubService();
                fs = new FeedService();
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
 
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.service.DR_PubService", "get", null );       
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.service.DR_PubService", "get", null );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.service.DR_PubService", "set", v );
-
        }
 
        @Test
@@ -93,16 +85,10 @@ public class Dr_PubServiceTest {
                }
 
                n2 = ns.removeDr_Pub( n2.getPubId(),  err );
-                       
-
        }
 
        @Test
        public void test4() {
                ArrayList<DR_Pub> l = ns.getDr_PubsByFeedId( "1" );
-
-
        }
-
-
 }
index 478647b..9f169ef 100644 (file)
@@ -20,7 +20,6 @@
 package org.onap.dmaap.dbcapi.service;
 
 import java.util.List;
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.model.ApiError;
@@ -29,35 +28,26 @@ import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class FeedServiceTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
        FeedService ds;
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ds = new FeedService();
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
 
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.service.FeedService", "get", null ); 
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.service.FeedService", "get", null );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.service.FeedService", "set", v );
-
        }
 
        @Test
@@ -86,7 +76,6 @@ public class FeedServiceTest {
        @Test
        public void test5() {
                List<Feed> f = ds.getAllFeeds( "aName", "1.0", "startsWith" );
-
        }
 
        
@@ -97,6 +86,4 @@ public class FeedServiceTest {
                
                assert( 200 == err.getCode());
        }
-
-
 }
index e80697a..aa5dd6d 100644 (file)
@@ -22,8 +22,6 @@ package org.onap.dmaap.dbcapi.service;
 import static org.junit.Assert.assertTrue;
 
 import java.util.List;
-
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.onap.dmaap.dbcapi.model.ApiError;
@@ -36,8 +34,6 @@ import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class MR_ClientServiceTest {
 
-       private static final String  fmt = "%24s: %s%n";
-       
        private static DmaapObjectFactory factory = new DmaapObjectFactory();
 
        ReflectionHarness rh = new ReflectionHarness();
@@ -52,6 +48,7 @@ public class MR_ClientServiceTest {
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ts = new TopicService();
                mcs = new MR_ClusterService();
                cls = new MR_ClientService();
@@ -68,24 +65,15 @@ public class MR_ClientServiceTest {
                MR_Cluster n2 = mcs.addMr_Cluster( node, err ); 
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.service.MR_ClientService", "get", null );    
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.service.MR_ClientService", "get", null );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.service.MR_ClientService", "set", v );
-
        }
 
        @Test
@@ -129,7 +117,5 @@ public class MR_ClientServiceTest {
                c = cls.addMr_Client( c, topic, err );
                assertTrue( err.getCode() == 200 );
 
-               
        }
-       
 }
index 8ae2667..7a35de3 100644 (file)
  */
 package org.onap.dmaap.dbcapi.service;
 
-import  org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
-
-import org.junit.After;
+import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
-import java.util.List;
+import org.onap.dmaap.dbcapi.model.ApiError;
+import org.onap.dmaap.dbcapi.model.DcaeLocation;
+import org.onap.dmaap.dbcapi.model.MR_Cluster;
+import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class MR_ClusterServiceTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
        MR_ClusterService ns;
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                ns = new MR_ClusterService();
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.service.MR_ClusterService", "get", null );   
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.service.MR_ClusterService", "get", null );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.service.MR_ClusterService", "set", v );
-
        }
 
        @Test
@@ -84,44 +72,7 @@ public class MR_ClusterServiceTest {
                if ( n2 != null ) {
                        n2 = ns.updateMr_Cluster( n2, err );
                }
-
                n2 = ns.removeMr_Cluster( f,  err );
-                               
-
-       }
-
-/*
-       @Test
-       public void test4() {
-               List<MR_Client> l = cls.getAllMr_Clients();
-
-               ArrayList<MR_Client> al = cls.getAllMrClients( "foo" );
-
-               ArrayList<MR_Client> al2 = cls.getClientsByLocation( "central" );
-       }
-
-       @Test
-       public void test5() {
-               Topic topic = new Topic();
-               ApiError err = new ApiError();
-               topic.setTopicName( "test3" );
-               topic.setFqtnStyle( FqtnType.Validator("none") );
-               topic.getFqtn();
-               Topic nTopic = ts.addTopic( topic, err );
-               if ( nTopic != null ) {
-                       assertTrue( nTopic.getTopicName().equals( topic.getTopicName() ));
-               }
-               String[] actions = { "pub", "view" };
-               MR_Client c = new MR_Client( "central-onap", "org.onap.dmaap.demo.interestingTopic2", "org.onap.clientApp.publisher", actions );
-
-               c = cls.addMr_Client( c, topic, err );
-               if ( c != null ) {
-                               actions[0] = "sub";
-                               c.setAction( actions );
-                               c = cls.updateMr_Client( c, err );
-                               assertTrue( err.getCode() == 200 );
-               }
        }
-*/
 
 }
index f247bad..efe6b41 100644 (file)
  */
 package org.onap.dmaap.dbcapi.service;
 
-import  org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertTrue;
 
-import org.junit.After;
+import java.util.ArrayList;
+import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
-import java.util.List;
-import java.util.ArrayList;
+import org.onap.dmaap.dbcapi.model.ApiError;
+import org.onap.dmaap.dbcapi.model.DcaeLocation;
+import org.onap.dmaap.dbcapi.model.Dmaap;
+import org.onap.dmaap.dbcapi.model.MR_Client;
+import org.onap.dmaap.dbcapi.model.MR_Cluster;
+import org.onap.dmaap.dbcapi.model.MirrorMaker;
+import org.onap.dmaap.dbcapi.model.ReplicationType;
+import org.onap.dmaap.dbcapi.model.Topic;
+import org.onap.dmaap.dbcapi.testframework.DmaapObjectFactory;
+import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class MirrorMakerServiceTest {
 
-       private static final String  fmt = "%24s: %s%n";
        private static DmaapObjectFactory factory = new DmaapObjectFactory();
        ReflectionHarness rh = new ReflectionHarness();
 
@@ -45,12 +49,12 @@ public class MirrorMakerServiceTest {
        
        private Topic replicationTopic;
 
-
        DmaapService ds;
        String locname;
 
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
                mms = new MirrorMakerService();
                ts = new TopicService();
                assert( ts != null );
@@ -93,36 +97,17 @@ public class MirrorMakerServiceTest {
                clients.add( pub );
 
                replicationTopic.setClients( clients );
-
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
-//     @Test
-//     public void test_getters() {
-//
-//
-//             rh.reflect( "org.onap.dmaap.dbcapi.service.MirrorMakerService", "get", null );  
-//     
-//     }
-
        @Test
        public void test_setters() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.service.MirrorMakerService", "set", v );
-
        }
-
-       
        
        @Test
        public void CreateMirrorMakerWithSingleTopic() {
                ApiError err = new ApiError();
-
-
                Topic nTopic = ts.addTopic(replicationTopic, err, true );
 
                assertTrue( err.getCode() == 200 );
@@ -178,8 +163,7 @@ public class MirrorMakerServiceTest {
                
                MirrorMaker mm = mms.getMirrorMaker(name);
                
-               MirrorMaker mm2 = mms.splitMM(mm);      
-
+               MirrorMaker mm2 = mms.splitMM(mm);
        }
 
 }
index 5beadc6..b0199bc 100644 (file)
 package org.onap.dmaap.dbcapi.service;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
 
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import org.junit.Before;
+import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
@@ -72,26 +57,16 @@ public class MirrorMakerServiceTestMockito {
     @Rule
     public ExpectedException thrown = ExpectedException.none();
 
-    @Before
-    public void setUp() throws Exception {
-   
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
     }
 
     @Test
-    public void init_normalConstructor() throws Exception {
-        //given
-        
-
-        //when
-        
-
-        //then
+    public void init_normalConstructor() {
         assertEquals( MirrorMakerService.getProvUserPwd(), MirrorMakerService.PROV_PWD_DEFAULT);
         assertEquals( MirrorMakerService.getDefaultConsumerPort(), MirrorMakerService.TARGET_REPLICATION_PORT_DEFAULT);
         assertEquals( MirrorMakerService.getDefaultProducerPort(), MirrorMakerService.SOURCE_REPLICATION_PORT_DEFAULT);
     }
 
-  // Todo: learn how to make more tests in Mockito
-
-
 }
index a37ce02..8d57496 100644 (file)
 
 package org.onap.dmaap.dbcapi.service;
 
-import com.google.common.collect.ImmutableMap;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
-import org.mockito.runners.MockitoJUnitRunner;
-import org.onap.dmaap.dbcapi.model.ApiError;
-import org.onap.dmaap.dbcapi.model.MR_Client;
-import org.onap.dmaap.dbcapi.model.Topic;
-import org.onap.dmaap.dbcapi.util.DmaapConfig;
-
-import javax.ws.rs.core.Response;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 import static com.google.common.collect.Iterables.getOnlyElement;
 import static com.google.common.collect.Lists.newArrayList;
 import static javax.ws.rs.core.Response.Status.NOT_FOUND;
@@ -56,6 +36,26 @@ import static org.mockito.Matchers.any;
 import static org.mockito.Mockito.verifyZeroInteractions;
 import static org.onap.dmaap.dbcapi.model.ReplicationType.REPLICATION_GLOBAL_TO_FQDN;
 
+import com.google.common.collect.ImmutableMap;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.ws.rs.core.Response;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.dmaap.dbcapi.model.ApiError;
+import org.onap.dmaap.dbcapi.model.MR_Client;
+import org.onap.dmaap.dbcapi.model.Topic;
+import org.onap.dmaap.dbcapi.util.DmaapConfig;
+
 @RunWith(MockitoJUnitRunner.class)
 public class TopicServiceTest {
 
@@ -75,6 +75,12 @@ public class TopicServiceTest {
     @Mock
     private AafTopicSetupService aafTopicSetupService;
 
+    @BeforeClass
+    public static void setUpClass(){
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+
+    }
+
     @Before
     public void setUp() throws Exception {
         given(dmaapConfig.getProperty("MR.globalHost", "global.host.not.set")).willReturn(GLOBAL_MR_HOST);
index 6ef05c0..9b097e7 100644 (file)
  */
 package org.onap.dmaap.dbcapi.util;
 
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
-
-import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class DmaapConfigTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
-       DmaapConfig g;
-
-
        @Before
        public void setUp() throws Exception {
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.util.DmaapConfig", "get", "" );      
-       
+               rh.reflect( "org.onap.dmaap.dbcapi.util.DmaapConfig", "get", "" );
        }
 
        @Test
        public void test2() {
                String v = "Validate";
                rh.reflect( "org.onap.dmaap.dbcapi.util.DmaapConfig", "set", v );
-
        }
 
        @Test
        public void test3() {
-
-               String f = g.getConfigFileName();
+               DmaapConfig.getConfigFileName();
+               DmaapConfig.getSSLSocketFactory();
        }
-
-
-
 }
 
index 770ee65..903d73b 100644 (file)
  */
 package org.onap.dmaap.dbcapi.util;
 
-import org.onap.dmaap.dbcapi.model.*;
-import org.onap.dmaap.dbcapi.service.*;
-import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
-
-import static org.junit.Assert.*;
-
-import org.junit.After;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
 import org.junit.Before;
 import org.junit.Test;
-import java.util.*;
+import org.onap.dmaap.dbcapi.model.DcaeLocation;
+import org.onap.dmaap.dbcapi.model.MR_Client;
+import org.onap.dmaap.dbcapi.service.DcaeLocationService;
+import org.onap.dmaap.dbcapi.testframework.ReflectionHarness;
 
 public class GraphTest {
 
-       private static final String  fmt = "%24s: %s%n";
-
        ReflectionHarness rh = new ReflectionHarness();
 
        Graph g;
 
-
        @Before
        public void setUp() throws Exception {
-               HashMap<String, String> hm = new HashMap<String,String>();
+               System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+               HashMap<String, String> hm = new HashMap<>();
                g = new Graph( hm );
        }
 
-       @After
-       public void tearDown() throws Exception {
-       }
-
-
        @Test
        public void test1() {
-
-
-               rh.reflect( "org.onap.dmaap.dbcapi.util.Graph", "get", "idNotSet@namespaceNotSet:pwdNotSet" );  
-       
-       }
-
-       @Test
-       public void test2() {
-               String v = "Validate";
-               //rh.reflect( "org.onap.dmaap.dbcapi.util.Graph", "set", v );
-
+               rh.reflect( "org.onap.dmaap.dbcapi.util.Graph", "get", "idNotSet@namespaceNotSet:pwdNotSet" );
        }
 
        @Test
@@ -82,7 +65,6 @@ public class GraphTest {
 
                HashMap<String, String> hm = new HashMap<String, String>();
 
-
                String s = g.put( "aKey", "aVal" );
                s = g.get( "aKey" );
 
@@ -93,10 +75,7 @@ public class GraphTest {
                hm = g.getGraph();
 
                Collection<String> k = g.getKeys();
-
        }
 
-
-
 }
 
index 8db9d2e..310497f 100644 (file)
@@ -24,7 +24,9 @@ import static org.mockito.Mockito.atMost;
 import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
+
 import javax.servlet.http.HttpServletRequest;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
@@ -45,6 +47,10 @@ public class PermissionBuilderTest {
     @Mock
     private HttpServletRequest request;
 
+    @BeforeClass
+    public static void setUpClass() throws Exception {
+        System.setProperty("ConfigFile", "src/test/resources/dmaapbc.properties");
+    }
 
     @Test
     public void updateDmaapInstance_shouldSetBootInstance_whenDmaapIsNotInitialized() {
index 5371015..8f01b44 100644 (file)
 from docs_conf.conf import *
 
 branch = 'latest'
+doc_url = 'https://docs.onap.org/projects'
 master_doc = 'index'
 
+intersphinx_mapping = {}
+
+# Latest (change to branch)
+intersphinx_mapping['onap-aai-aai-common'] = ('{}/onap-aai-aai-common/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-aai-sparky-be'] = ('{}/onap-aai-sparky-be/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-ccsdk-cds'] = ('{}/onap-ccsdk-cds/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-ccsdk-features'] = ('{}/onap-ccsdk-features/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-ccsdk-distribution'] = ('{}/onap-ccsdk-distribution/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-ccsdk-oran'] = ('{}/onap-ccsdk-oran/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-cli'] = ('{}/onap-cli/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-cps'] = ('{}/onap-cps/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-dcaegen2'] = ('{}/onap-dcaegen2/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-dmaap-messagerouter-messageservice'] = (
+    '{}/onap-dmaap-messagerouter-messageservice/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-dmaap-buscontroller'] = ('{}/onap-dmaap-buscontroller/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-dmaap-datarouter'] = ('{}/onap-dmaap-datarouter/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-dmaap-dbcapi'] = ('{}/onap-dmaap-dbcapi/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-externalapi-nbi'] = ('{}/onap-externalapi-nbi/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-holmes-engine-management'] = (
+    '{}/onap-holmes-engine-management/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-holmes-rule-management'] = (
+    '{}/onap-holmes-rule-management/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-integration'] = ('{}/onap-integration/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-modeling-etsicatalog'] = ('{}/onap-modeling-etsicatalog/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-modeling-modelspec'] = ('{}/onap-modeling-modelspec/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-multicloud-framework'] = ('{}/onap-multicloud-framework/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-msb-apigateway'] = ('{}/onap-msb-apigateway/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-oom'] = ('{}/onap-oom/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-oom-offline-installer'] = ('{}/onap-oom-offline-installer/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-oom-platform-cert-service'] = (
+    '{}/onap-oom-platform-cert-service/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-optf-cmso'] = ('{}/onap-optf-cmso/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-optf-osdf'] = ('{}/onap-optf-osdf/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-optf-has'] = ('{}/onap-optf-has/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-policy-clamp'] = ('{}/onap-policy-clamp/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-policy-parent'] = ('{}/onap-policy-parent/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-sdc'] = ('{}/onap-sdc/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-sdnc-oam'] = ('{}/onap-sdnc-oam/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-so'] = ('{}/onap-so/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-usecase-ui'] = ('{}/onap-usecase-ui/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vfc-nfvo-lcm'] = ('{}/onap-vfc-nfvo-lcm/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vid'] = ('{}/onap-vid/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vnfrqts-guidelines'] = ('{}/onap-vnfrqts-guidelines/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vnfrqts-requirements'] = ('{}/onap-vnfrqts-requirements/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vnfrqts-testcases'] = ('{}/onap-vnfrqts-testcases/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vnfrqts-usecases'] = ('{}/onap-vnfrqts-usecases/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vnfsdk-model'] = ('{}/onap-vnfsdk-model/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vvp-documentation'] = ('{}/onap-vvp-documentation/en/%s'.format(doc_url) % branch, None)
+
+# Guilin
+branch = 'guilin'
+intersphinx_mapping['onap-portal'] = ('{}/onap-portal/en/%s'.format(doc_url) % branch, None)
+
+# Frankfurt
+branch = 'frankfurt'
+intersphinx_mapping['onap-appc'] = ('{}/onap-appc/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-appc-deployment'] = ('{}/onap-appc-deployment/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-music'] = ('{}/onap-music/en/%s'.format(doc_url) % branch, None)
+
+# Latest
+branch = 'latest'
+intersphinx_mapping['onap-aaf-authz'] = ('{}/onap-aaf-authz/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-aaf-sms'] = ('{}/onap-aaf-sms/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-aai-event-client'] = ('{}/onap-aai-event-client/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-aai-esr-gui'] = ('{}/onap-aai-esr-gui/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-aai-esr-server'] = ('{}/onap-aai-esr-server/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-ccsdk-apps'] = ('{}/onap-ccsdk-apps/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-ccsdk-dashboard'] = ('{}/onap-ccsdk-dashboard/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-ccsdk-platform-plugins'] = (
+    '{}/onap-ccsdk-platform-plugins/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-logging-analytics'] = ('{}/onap-logging-analytics/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-logging-analytics-pomba-pomba-audit-common'] = (
+    '{}/onap-logging-analytics-pomba-pomba-audit-common/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-modeling-toscaparsers'] = (
+    '{}/onap-modeling-toscaparsers/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-msb-discovery'] = ('{}/onap-msb-discovery/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-msb-java-sdk'] = ('{}/onap-msb-java-sdk/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-msb-swagger-sdk'] = ('{}/onap-msb-swagger-sdk/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-multicloud-azure'] = ('{}/onap-multicloud-azure/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-multicloud-k8s'] = ('{}/onap-multicloud-k8s/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-music-distributed-kv-store'] = (
+    '{}/onap-music-distributed-kv-store/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-oparent-cia'] = ('{}/onap-oparent-cia/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-osa'] = ('{}/onap-osa/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-sdc-sdc-distribution-client'] = (
+    '{}/onap-sdc-sdc-distribution-client/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-sdc-sdc-workflow-designer'] = (
+    '{}/onap-sdc-sdc-workflow-designer/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-sdc-sdc-tosca'] = ('{}/onap-sdc-sdc-tosca/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-sdc-sdc-docker-base'] = ('{}/onap-sdc-sdc-docker-base/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-so-libs'] = ('{}/onap-so-libs/en/%s'.format(doc_url) % branch, None)
+intersphinx_mapping['onap-vfc-nfvo-driver-vnfm-svnfm'] = (
+    '{}/onap-vfc-nfvo-driver-vnfm-svnfm/en/%s'.format(doc_url) % branch, None)
+
 linkcheck_ignore = [
     'http://localhost',
+    'https://example.com',
+    'about:config',
+    # this URL is not directly reachable and must be configured in the system hosts file.
+    'https://portal.api.simpledemo.onap.org:30225/ONAPPORTAL/login.htm',
+    # anchor issues
+    'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#.*',
+    'https://docs.linuxfoundation.org/docs/communitybridge/easycla/contributors/contribute-to-a-gerrit-project#.*',
+    'https://docs.onap.org/projects/onap-integration/en/latest/docs_robot.html#docs-robot',
+    'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases_release.html#docs-usecases-release',
+    'https://docs.onap.org/projects/onap-integration/en/latest/docs_usecases.html#docs-usecases',
+    'https://docs.onap.org/projects/onap-integration/en/latest/usecases/release_non_functional_requirements.html#release-non-functional-requirements',
 ]
 
-intersphinx_mapping = {}
 
 html_last_updated_fmt = '%d-%b-%y %H:%M'
 
+
 def setup(app):
-    app.add_stylesheet("css/ribbon.css")
+    app.add_css_file("css/ribbon.css")
index 40dcb45..6360816 100644 (file)
@@ -17,16 +17,89 @@ Release Notes
 ..      * This note must be removed after content has been added.
 
 
+Istanbul
+========
+
+Abstract
+--------
+This document provides the release notes for the Istanbul release.
+
+Summary
+-------
+Repo merges, package updates and dbc-clients changes
+
+Release Data
+------------
++--------------------------------------+--------------------------------------+
+| **DMaaP Bus Controller Project**     |                                      |
+|                                      |                                      |
++--------------------------------------+--------------------------------------+
+| **Docker images**                    | - dmaap-bc 2.0.8                     |
+|                                      | - dbc-client 2.0.7                   |
++--------------------------------------+--------------------------------------+
+| **Release designation**              | 9.0.0 Istanbul                       |
+|                                      |                                      |
++--------------------------------------+--------------------------------------+
+| **Release date**                     | 2021-10-14                           |
+|                                      |                                      |
++--------------------------------------+--------------------------------------+
+
+
+New features
+------------
+* Consolidated BC repos - DMAAP-1544
+* Package upgrades  - DMAAP-1608
+* Update dbc-client script - DMAAP-1561
+
+Known Limitations, Issues and Workarounds
+-----------------------------------------
+
+System Limitations
+------------------
+
+
+Known Vulnerabilities
+---------------------
+
+
+Workarounds
+-----------
+
+
+Security Notes
+--------------
+
+
+References
+----------
+
+For more information on the ONAP Honolulu release, please see:
+
+#. `ONAP Home Page`_
+#. `ONAP Documentation`_
+#. `ONAP Release Downloads`_
+#. `ONAP Wiki Page`_
+
+
+.. _`ONAP Home Page`: https://www.onap.org
+.. _`ONAP Wiki Page`: https://wiki.onap.org
+.. _`ONAP Documentation`: https://docs.onap.org
+.. _`ONAP Release Downloads`: https://git.onap.org
+
+
+Quick Links:
+
+- `DMAAP project page <https://wiki.onap.org/display/DW/DMaaP+Planning>`_
+- `Passing Badge information for DMAAP <https://bestpractices.coreinfrastructure.org/en/projects/2147>`_
+
 
 Honolulu
 ========
 
 
-
 Abstract
 --------
 
-
 This document provides the release notes for the Honolulu release.
 
 
@@ -282,7 +355,7 @@ El Alto
 Version: 1.1.5 
 --------------
 
-: Release Date: 2019-06-06 (El Alto)
+:Release Date: 2019-06-06 (El Alto)
 
 **New Features**
 
@@ -312,10 +385,13 @@ Quick Links:
        NA
        
 
+Dublin
+======
 
-Version: 1.1.5 (Dublin)
------------------------
-: Release Date: 2019-06-06
+Version: 1.1.5
+--------------
+
+:Release Date: 2019-06-06
 
 **New Features**
 
@@ -344,9 +420,13 @@ NA
 **Deprecation Notes**
 
 
+Casablanca
+==========
+
 Version: 1.0.23
 ---------------
-: Release Date: 2018-10-18
+
+:Release Date: 2018-10-18
 
 **New Features**
 
index b3188dd..74a3b7a 100644 (file)
@@ -1,15 +1 @@
-tox
-Sphinx
-doc8
-docutils
-setuptools
-six
-sphinx_rtd_theme>=0.4.3
-sphinxcontrib-blockdiag
-sphinxcontrib-needs>=0.2.3
-sphinxcontrib-nwdiag
-sphinxcontrib-seqdiag
-sphinxcontrib-swaggerdoc
-sphinxcontrib-plantuml
-sphinx_bootstrap_theme
 lfdocs-conf
index edac8c3..42ffa68 100644 (file)
@@ -5,7 +5,10 @@ skipsdist = true
 
 [testenv:docs]
 basepython = python3
-deps = -r{toxinidir}/requirements-docs.txt
+deps =
+    -r{toxinidir}/requirements-docs.txt
+    -chttps://git.onap.org/doc/plain/etc/upper-constraints.os.txt
+    -chttps://git.onap.org/doc/plain/etc/upper-constraints.onap.txt
 commands =
     sphinx-build -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html
     echo "Generated docs available in {toxinidir}/_build/html"
diff --git a/pom.xml b/pom.xml
index fccdb22..f70c083 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -33,7 +33,7 @@
   </parent>
 
   <properties>
-    <revision>2.0.7-SNAPSHOT</revision>
+    <revision>2.0.8-SNAPSHOT</revision>
     <multiproject.basedir>${basedir}</multiproject.basedir>
     <docker.maven.plugin.version>1.0.0</docker.maven.plugin.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/releases/2.0.8.yaml b/releases/2.0.8.yaml
new file mode 100644 (file)
index 0000000..16a5110
--- /dev/null
@@ -0,0 +1,8 @@
+distribution_type: 'container'
+container_release_tag: '2.0.8'
+project: 'dmaap-buscontroller'
+log-dir: 'dmaap-buscontroller-maven-docker-stage-master/806'
+ref:  301592541b7e1d12823bc6c125d0b72b6af91ae3
+containers:
+  - name: dmaap/dmaap-bc
+    version: 2.0.8-20210823T122953Z
index 00f338b..b972981 100644 (file)
@@ -27,7 +27,7 @@
 
 major=2
 minor=0
-patch=7
+patch=8
 base_version=${major}.${minor}.${patch}
 
 # Release must be completed with git revision # in Jenkins