aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter/src/test/java
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2020-02-12 11:13:08 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-02-12 11:13:09 -0500
commit5ba5518f6b9dffbf0fed7f3655b1635cd818bc1e (patch)
tree417a3b906a03726a760ffbfc3c543f20022ff707 /adapters/mso-catalog-db-adapter/src/test/java
parent1980195d94d2208c8f5c8951885cfe345fbc8dd1 (diff)
mso to add support for creating the cloud region
Initial check in to support cloud region create Add additional junit tests Add additional integration tests Updated junit to use spy and removed setter method Issue-ID: SO-2657 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I6a93f3b4caf7d640ffa5842981247d284b9013ad
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/test/java')
-rw-r--r--adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
index 707a2a45af..739b4b62de 100644
--- a/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
+++ b/adapters/mso-catalog-db-adapter/src/test/java/org/onap/so/db/catalog/client/CatalogDbClientTest.java
@@ -22,8 +22,8 @@ package org.onap.so.db.catalog.client;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -428,7 +428,7 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest {
}
@Test
- public void testPostCloudSite() {
+ public void testCloudSiteClient() {
CatalogDbClientPortChanger localClient = new CatalogDbClientPortChanger(
"http://localhost:" + client.wiremockPort, msoAdaptersAuth, client.wiremockPort);
CloudSite cloudSite = new CloudSite();
@@ -455,6 +455,19 @@ public class CatalogDbClientTest extends CatalogDbAdapterBaseTest {
assertEquals("TESTCLLI", getCloudSite.getClli());
assertEquals("regionId", getCloudSite.getRegionId());
assertEquals("RANDOMID", getCloudSite.getIdentityServiceId());
+
+ getCloudSite.setClli("clli2");
+ getCloudSite.setRegionId("region2");
+
+ CloudSite updatedCloudSite = this.client.updateCloudSite(getCloudSite);
+ assertNotNull(updatedCloudSite);
+ assertNotNull(updatedCloudSite.getIdentityService());
+ assertEquals("clli2", updatedCloudSite.getClli());
+ assertEquals("region2", updatedCloudSite.getRegionId());
+
+ this.client.deleteCloudSite(getCloudSite.getId());
+ getCloudSite = this.client.getCloudSite("MTN6");
+ assertNull(getCloudSite);
}
@Test