aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter/src
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src')
-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