aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-requests-db-adapter/src/test/java
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2019-05-15 14:19:49 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-05-15 14:19:58 -0400
commite4687eeb77d9fddf14935894026aec0b1c9e3ac9 (patch)
tree47c85cd95c71d36a404da6c83fbbb5d11fb0fb2c /adapters/mso-requests-db-adapter/src/test/java
parentf9c309fb9e789225ccd6b02ec9ab4777bbd4021c (diff)
store openstack request status in requestdb
Openstack request status now stored in request db Change-Id: Ida8f4f613d406c2b834ab190e01d5aaf2f16dd3d Issue-ID: SO-1867 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters/mso-requests-db-adapter/src/test/java')
-rw-r--r--adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java34
1 files changed, 22 insertions, 12 deletions
diff --git a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
index 03df115574..711606cfa1 100644
--- a/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
+++ b/adapters/mso-requests-db-adapter/src/test/java/org/onap/so/adapters/requestsdb/client/RequestsDbClientTest.java
@@ -20,6 +20,17 @@
package org.onap.so.adapters.requestsdb.client;
+import static com.shazam.shazamcrest.MatcherAssert.assertThat;
+import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -32,21 +43,10 @@ import org.onap.so.db.request.beans.OperationalEnvDistributionStatus;
import org.onap.so.db.request.beans.OperationalEnvServiceModelStatus;
import org.onap.so.db.request.beans.RequestProcessingData;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.web.server.LocalServerPort;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
-import java.util.List;
-import java.util.UUID;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.ArrayList;
-import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs;
-import static com.shazam.shazamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertFalse;
public class RequestsDbClientTest extends RequestsAdapterBase {
@@ -232,6 +232,7 @@ public class RequestsDbClientTest extends RequestsAdapterBase {
assertEquals(2, requestProcessingDataList.size());
}
+
@Test
public void findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestIdTest() {
OperationalEnvServiceModelStatus operationalEnvServiceModelStatus =
@@ -268,4 +269,13 @@ public class RequestsDbClientTest extends RequestsAdapterBase {
assertEquals("ERROR", operationalEnvDistributionStatus.getDistributionIdErrorReason());
assertEquals("00032ab7-3fb3-42e5-965d-8ea592502017", operationalEnvDistributionStatus.getRequestId());
}
+
+ @Test
+ public void getRequestProcessingDataBySoRequestIdAndName() {
+ RequestProcessingData requestProcessingData = requestsDbClient
+ .getRequestProcessingDataBySoRequestIdAndNameAndGrouping("00032ab7-na18-42e5-965d-8ea592502018",
+ "requestAction", "7d2e8c07-4d10-456d-bddc-37abf38ca714");
+ assertNotNull(requestProcessingData);
+
+ }
}