Update SDC library
Upgrade SDC library to latest and remove the message bus condition, it's
now a mandatory parameter as well
Issue-ID: CLAMP-149
Change-Id: I4c7ddcca6ac176380821bd8f1e4e3ef3d9fcea30
Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
diff --git a/src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java b/src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java
index dd60d27..00d5dff 100644
--- a/src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java
+++ b/src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java
@@ -22,6 +22,7 @@
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -59,7 +60,7 @@
assertEquals("consumerGroup", sdcConfig.getConsumerGroup());
assertEquals("consumerId", sdcConfig.getConsumerID());
assertEquals("environmentName", sdcConfig.getEnvironmentName());
- assertEquals("hostname", sdcConfig.getAsdcAddress());
+ assertEquals("hostname:8080", sdcConfig.getAsdcAddress());
assertEquals(10, sdcConfig.getPollingInterval());
assertEquals(30, sdcConfig.getPollingTimeout());
assertEquals(SdcSingleControllerConfiguration.SUPPORTED_ARTIFACT_TYPES_LIST.size(),
@@ -81,13 +82,13 @@
fail("Should have raised an exception");
}
- @Test(expected = SdcParametersException.class)
- public final void testAllRequiredParametersAddresses()
+ @Test
+ public final void testAllRequiredParametersEmptyEncrypted()
throws JsonParseException, JsonMappingException, IOException {
SdcSingleControllerConfiguration sdcConfig = loadControllerConfiguration(
- "clds/sdc-controller-config-bad-address.json", "sdc-controller1");
+ "clds/sdc-controller-config-empty-encrypted.json", "sdc-controller1");
sdcConfig.testAllRequiredParameters();
- fail("Should have raised an exception");
+ assertNull(sdcConfig.getKeyStorePassword());
}
@Test
diff --git a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
index 5486e65..46bddaf 100644
--- a/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
+++ b/src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java
@@ -43,11 +43,11 @@
import org.onap.clamp.clds.exception.sdc.controller.CsarHandlerException;
import org.onap.clamp.clds.exception.sdc.controller.SdcArtifactInstallerException;
import org.onap.clamp.clds.util.ResourceFileUtil;
-import org.openecomp.sdc.api.notification.IArtifactInfo;
-import org.openecomp.sdc.api.notification.INotificationData;
-import org.openecomp.sdc.api.notification.IResourceInstance;
-import org.openecomp.sdc.api.results.IDistributionClientDownloadResult;
-import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException;
+import org.onap.sdc.api.notification.IArtifactInfo;
+import org.onap.sdc.api.notification.INotificationData;
+import org.onap.sdc.api.notification.IResourceInstance;
+import org.onap.sdc.api.results.IDistributionClientDownloadResult;
+import org.onap.sdc.tosca.parser.exceptions.SdcToscaParserException;
public class CsarHandlerTest {
diff --git a/src/test/resources/clds/sdc-controller-config-NULL.json b/src/test/resources/clds/sdc-controller-config-NULL.json
index 5c8ec0c..bf310c7 100644
--- a/src/test/resources/clds/sdc-controller-config-NULL.json
+++ b/src/test/resources/clds/sdc-controller-config-NULL.json
@@ -3,8 +3,9 @@
"consumerGroup": "NULL",
"consumerId": "consumerId",
"environmentName": "environmentName",
- "sdcAddress": "hostname",
+ "sdcAddress": "hostname:8080",
"password": "bb3871669d893c7fb8aaacda31b77b4f537E67A081C2726889548ED7BC4C2DE6",
"pollingInterval":10,
- "pollingTimeout":30
+ "pollingTimeout":30,
+ "messageBusAddresses":["localhost"]
}
diff --git a/src/test/resources/clds/sdc-controller-config-TLS.json b/src/test/resources/clds/sdc-controller-config-TLS.json
index 066448e..99366b7 100644
--- a/src/test/resources/clds/sdc-controller-config-TLS.json
+++ b/src/test/resources/clds/sdc-controller-config-TLS.json
@@ -3,7 +3,7 @@
"consumerGroup": "consumerGroup",
"consumerId": "consumerId",
"environmentName": "environmentName",
- "sdcAddress": "hostname",
+ "sdcAddress": "hostname:8080",
"password": "bb3871669d893c7fb8aaacda31b77b4f537E67A081C2726889548ED7BC4C2DE6",
"pollingInterval":10,
"pollingTimeout":30,
diff --git a/src/test/resources/clds/sdc-controller-config-bad.json b/src/test/resources/clds/sdc-controller-config-bad.json
index d99ed58..194ff5f 100644
--- a/src/test/resources/clds/sdc-controller-config-bad.json
+++ b/src/test/resources/clds/sdc-controller-config-bad.json
@@ -5,7 +5,7 @@
"consumerGroup": "consumerGroup",
"consumerId": "consumerId",
"environmentName": "environmentName",
- "sdcAddress": "hostname1",
+ "sdcAddress": "hostname1:8080",
"pollingInterval": 10,
"pollingTimeout": 30
}
diff --git a/src/test/resources/clds/sdc-controller-config-bad-address.json b/src/test/resources/clds/sdc-controller-config-empty-encrypted.json
similarity index 69%
rename from src/test/resources/clds/sdc-controller-config-bad-address.json
rename to src/test/resources/clds/sdc-controller-config-empty-encrypted.json
index 6775c6b..2a70b9e 100644
--- a/src/test/resources/clds/sdc-controller-config-bad-address.json
+++ b/src/test/resources/clds/sdc-controller-config-empty-encrypted.json
@@ -3,10 +3,12 @@
"consumerGroup": "consumerGroup",
"consumerId": "consumerId",
"environmentName": "environmentName",
+ "sdcAddress": "hostname:8080",
"password": "bb3871669d893c7fb8aaacda31b77b4f537E67A081C2726889548ED7BC4C2DE6",
"pollingInterval":10,
"pollingTimeout":30,
"activateServerTLSAuth": true,
- "keyStorePassword":"bb3871669d893c7fb8aaacda31b77b4f537E67A081C2726889548ED7BC4C2DE6",
- "keyStorePath": "/test"
+ "keyStorePassword":"",
+ "keyStorePath": "/test",
+ "messageBusAddresses":["localhost"]
}