summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/test/java/org
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2017-06-29 19:30:00 +0300
committerMichael Lando <ml636r@att.com>2017-06-29 21:32:19 +0300
commited7e1c3dfe332abc67ed943717db2ee94406f95e (patch)
treee0f2f39596656456272900f59aadc3dff6c6e828 /catalog-be/src/test/java/org
parent68ccc45de18f41cddb79de33a245bceb3b063ffb (diff)
[SDC] rebase code
Change-Id: I456ec65a233d277e6bae35e140f2e3da5765bae6 Signed-off-by: Tal Gitelman <tg851x@intl.att.com> Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-be/src/test/java/org')
-rw-r--r--catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java
index d6808da5d6..4251749f5a 100644
--- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java
+++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServletTest.java
@@ -101,7 +101,7 @@ public class AssetsDataServletTest extends JerseyTest {
when(request.getHeader(Constants.X_ECOMP_INSTANCE_ID_HEADER)).thenReturn("mockXEcompInstanceId");
when(request.getHeader(Constants.USER_ID_HEADER)).thenReturn("mockAttID");
when(request.getRequestURL()).thenReturn(new StringBuffer("sdc/v1/catalog/resources"));
-
+
when(session.getServletContext()).thenReturn(servletContext);
when(servletContext.getAttribute(Constants.WEB_APPLICATION_CONTEXT_WRAPPER_ATTR)).thenReturn(webAppContextWrapper);
when(webAppContextWrapper.getWebAppContext(servletContext)).thenReturn(webApplicationContext);
@@ -159,7 +159,8 @@ public class AssetsDataServletTest extends JerseyTest {
@Test
public void createVfcmtHappyScenario() {
final JSONObject createRequest = buildCreateJsonRequest();
- Response response = target().path("/v1/catalog/resources").request(MediaType.APPLICATION_JSON).post(Entity.json(createRequest.toJSONString()), Response.class);
+ Response response = target().path("/v1/catalog/resources").request(MediaType.APPLICATION_JSON).header(Constants.X_ECOMP_INSTANCE_ID_HEADER, "mockXEcompInstanceId").header(Constants.USER_ID_HEADER, "mockAttID")
+ .post(Entity.json(createRequest.toJSONString()), Response.class);
assertTrue(response.getStatus() == HttpStatus.SC_CREATED);
}