Merge "JUNITS for JSONDELETE class"
authorBrendan Tschaen <ctschaen@att.com>
Thu, 7 May 2020 18:24:57 +0000 (18:24 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 7 May 2020 18:24:57 +0000 (18:24 +0000)
14 files changed:
music-core/pom.xml
music-core/src/main/java/org/onap/music/datastore/MusicDataStore.java
music-core/src/test/java/org/onap/music/datastore/MusicDataStoreTest.java
music-core/src/test/java/org/onap/music/datastore/jsonobjects/JsonSelectTest.java
music-rest/pom.xml
music-rest/src/main/java/org/onap/music/main/PropertiesLoader.java
pom.xml
releases/3.2.38-container.yaml [new file with mode: 0644]
releases/3.2.38.yaml [new file with mode: 0644]
releases/3.2.39-container.yaml [new file with mode: 0644]
releases/3.2.39.yaml [new file with mode: 0644]
releases/3.2.40-container.yaml [new file with mode: 0644]
releases/3.2.40.yaml [new file with mode: 0644]
version.properties

index 2001848..cf7f59e 100755 (executable)
@@ -27,7 +27,7 @@
     <groupId>org.onap.music</groupId>
     <artifactId>MUSIC-core</artifactId>
     <packaging>jar</packaging>
-    <version>3.2.38-SNAPSHOT</version>
+    <version>3.2.40-SNAPSHOT</version>
     <description>
             This is the MUSIC core interface, packaged as a jar file.
     </description>
@@ -36,7 +36,7 @@
     <parent>
         <groupId>org.onap.music</groupId>
         <artifactId>MUSIC</artifactId>
-        <version>3.2.38-SNAPSHOT</version>
+        <version>3.2.40-SNAPSHOT</version>
     </parent>
 
     <properties>
index cb22c0f..9ce73cc 100755 (executable)
@@ -159,7 +159,12 @@ public class MusicDataStore {
 
         Cluster cluster;
         if(MusicUtil.getCassName() != null && MusicUtil.getCassPwd() != null) {
-            String cassPwd = CipherUtil.decryptPKC(MusicUtil.getCassPwd());
+            String cassPwd;
+            if (MusicUtil.getCipherEncKey() != null && !("").equals(MusicUtil.getCipherEncKey())) {
+                cassPwd = CipherUtil.decryptPKC(MusicUtil.getCassPwd());
+            } else {
+                cassPwd = MusicUtil.getCassPwd();
+            }
             logger.info(EELFLoggerDelegate.applicationLogger,
                     "Building with credentials "+MusicUtil.getCassName()+" & "+ MusicUtil.getCassPwd());
             cluster = Cluster.builder().withPort(MusicUtil.getCassandraPort())
index 4de995f..9260cd9 100644 (file)
@@ -80,10 +80,6 @@ public class MusicDataStoreTest {
         dataStore = new MusicDataStore(cluster, session);
     }
 
-    @Test
-    public void testMusicDataStore() {
-        //MusicDataStore mds = new MusicDataStore();
-    }
     
     @Test
     public void testMusicDataStoreClusterSession() {
index 21c022a..baada1d 100644 (file)
@@ -33,10 +33,10 @@ import java.util.Map;
 import org.junit.Test;
 
 public class JsonSelectTest {
+    JsonSelect js = new JsonSelect();
 
     @Test
     public void testGetConsistencyInfo() {
-        JsonSelect js = new JsonSelect();
         Map<String, String> mapSs = new HashMap<>();
         mapSs.put("k1", "one");
         js.setConsistencyInfo(mapSs);
@@ -45,11 +45,24 @@ public class JsonSelectTest {
 
     @Test
     public void testSerialize() throws IOException {
-        JsonSelect js = new JsonSelect();
         Map<String, String> mapSs = new HashMap<>();
         mapSs.put("Key", "Value");
         js.setConsistencyInfo(mapSs);
         js.serialize();
     }
 
+    @Test
+    public void testGetKeyspaceName() {
+        js.setKeyspaceName("testkeyspace");
+        assertEquals("testkeyspace",js.getKeyspaceName());
+
+    }
+
+    @Test
+    public void testGetTableName() {
+        js.setTableName("testkeyspace");
+        assertEquals("testkeyspace",js.getTableName());
+
+    }
+
 }
index 4dad5e8..9bcfd39 100755 (executable)
@@ -27,7 +27,7 @@
     <groupId>org.onap.music</groupId>
     <artifactId>MUSIC-rest</artifactId>
     <packaging>jar</packaging>
-    <version>3.2.38-SNAPSHOT</version>
+    <version>3.2.40-SNAPSHOT</version>
     <description>
             This is the MUSIC Spring-based REST service.
     </description>
@@ -36,7 +36,7 @@
     <parent>
         <groupId>org.onap.music</groupId>
         <artifactId>MUSIC</artifactId>
-        <version>3.2.38-SNAPSHOT</version>
+        <version>3.2.40-SNAPSHOT</version>
     </parent>
 
     <properties>
         <dependency>
           <groupId>org.onap.music</groupId>
           <artifactId>MUSIC-core</artifactId>
-          <version>3.2.38-SNAPSHOT</version>
+          <version>3.2.40-SNAPSHOT</version>
         </dependency>
         <!-- Jersey -->
         <dependency>
index 3017b6d..11dc51d 100644 (file)
@@ -33,7 +33,8 @@ import org.springframework.context.annotation.PropertySource;
 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
 import org.springframework.stereotype.Component;
 
-@PropertySource(value = {"file:/opt/app/music/etc/music.properties", "classpath:/project.properties","file:/opt/app/music/etc/key.properties"})
+@PropertySource(value = {"file:/opt/app/music/etc/music.properties", "classpath:/project.properties"})
+//"file:/opt/app/music/etc/key.properties"
 @Component
 public class PropertiesLoader implements InitializingBean {
 
@@ -118,7 +119,7 @@ public class PropertiesLoader implements InitializingBean {
     @Value("${music.aaf.ns}")
     private String musicAafNs;
 
-    @Value("${cipher.enc.key}")
+    @Value("${cipher.enc.key:}")
     private String cipherEncKey;
 
     @SuppressWarnings("unused")
diff --git a/pom.xml b/pom.xml
index 2faeef9..05bdaef 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
     <groupId>org.onap.music</groupId>
     <artifactId>MUSIC</artifactId>
     <packaging>pom</packaging>
-    <version>3.2.38-SNAPSHOT</version>
+    <version>3.2.40-SNAPSHOT</version>
     <description>
             This is the MUSIC project.
     </description>
diff --git a/releases/3.2.38-container.yaml b/releases/3.2.38-container.yaml
new file mode 100644 (file)
index 0000000..d745f05
--- /dev/null
@@ -0,0 +1,8 @@
+distribution_type: 'container'
+container_release_tag: '3.2.38'
+project: 'music'
+log_dir: 'music-maven-docker-stage-master/336'
+ref: fd5224f4aaf68e6ae186ef8a163edd7f5b2966f7
+containers:
+    - name: 'music/music_sb'
+      version: '3.2.38-latest'
diff --git a/releases/3.2.38.yaml b/releases/3.2.38.yaml
new file mode 100644 (file)
index 0000000..086fc3a
--- /dev/null
@@ -0,0 +1,5 @@
+---
+distribution_type: 'maven'
+version: '3.2.38'
+project: 'music'
+log_dir: 'music-maven-stage-master/353/'
diff --git a/releases/3.2.39-container.yaml b/releases/3.2.39-container.yaml
new file mode 100644 (file)
index 0000000..5173111
--- /dev/null
@@ -0,0 +1,8 @@
+distribution_type: 'container'
+container_release_tag: '3.2.39'
+project: 'music'
+log_dir: 'music-maven-docker-stage-master/338'
+ref: 99f396136789182931fbded1127856247593d91b
+containers:
+    - name: 'music/music_sb'
+      version: '3.2.39-latest'
diff --git a/releases/3.2.39.yaml b/releases/3.2.39.yaml
new file mode 100644 (file)
index 0000000..8d0abaa
--- /dev/null
@@ -0,0 +1,5 @@
+---
+distribution_type: 'maven'
+version: '3.2.39'
+project: 'music'
+log_dir: 'music-maven-stage-master/354/'
diff --git a/releases/3.2.40-container.yaml b/releases/3.2.40-container.yaml
new file mode 100644 (file)
index 0000000..5353ecf
--- /dev/null
@@ -0,0 +1,8 @@
+distribution_type: 'container'
+container_release_tag: '3.2.40'
+project: 'music'
+log_dir: 'music-maven-docker-stage-master/340'
+ref: 0c173cdf44af313e376f1e8ae4fd6e6973c6c20b
+containers:
+    - name: 'music/music_sb'
+      version: '3.2.40-latest'
diff --git a/releases/3.2.40.yaml b/releases/3.2.40.yaml
new file mode 100644 (file)
index 0000000..1fc4307
--- /dev/null
@@ -0,0 +1,5 @@
+---
+distribution_type: 'maven'
+version: '3.2.40'
+project: 'music'
+log_dir: 'music-maven-stage-master/357/'
index 842b137..246c08f 100755 (executable)
@@ -4,7 +4,7 @@
 
 major=3
 minor=2
-patch=38
+patch=40
 
 base_version=${major}.${minor}.${patch}