aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/clamp/clds/config/sdc/SdcSingleControllerConfigurationTest.java11
-rw-r--r--src/test/java/org/onap/clamp/clds/sdc/controller/installer/CsarHandlerTest.java10
-rw-r--r--src/test/resources/clds/sdc-controller-config-NULL.json5
-rw-r--r--src/test/resources/clds/sdc-controller-config-TLS.json2
-rw-r--r--src/test/resources/clds/sdc-controller-config-bad.json2
-rw-r--r--src/test/resources/clds/sdc-controller-config-empty-encrypted.json (renamed from src/test/resources/clds/sdc-controller-config-bad-address.json)6
6 files changed, 20 insertions, 16 deletions
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 dd60d2796..00d5dffbb 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 @@ package org.onap.clamp.clds.config.sdc;
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 @@ public class SdcSingleControllerConfigurationTest {
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 @@ public class SdcSingleControllerConfigurationTest {
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 5486e652b..46bddaf4f 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.mockito.Mockito;
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 5c8ec0cfe..bf310c706 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 066448ee3..99366b765 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 d99ed5801..194ff5f4b 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
index 6775c6b3c..2a70b9edc 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"]
}