diff options
author | Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> | 2021-02-03 14:18:39 +0100 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2021-02-05 22:55:53 +0000 |
commit | 8bbecead253c30da60577ecd014d59983e4b6113 (patch) | |
tree | 870e2c2051598724cad30e0fa5e539378737e3c7 /sdnr/wt/helpserver | |
parent | 2f9e781a7c3e22bf25df83dcc3ff44b885a80957 (diff) |
Migrate apigateway and helpserver
Migrate apigateway and helpserver to Aluminium
Issue-ID: CCSDK-3129
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: I6a669b7e0e5d805cab4a9e59e2b21a95fb6506f8
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/helpserver')
-rw-r--r-- | sdnr/wt/helpserver/feature/pom.xml | 4 | ||||
-rwxr-xr-x | sdnr/wt/helpserver/installer/pom.xml | 2 | ||||
-rwxr-xr-x | sdnr/wt/helpserver/pom.xml | 2 | ||||
-rw-r--r-- | sdnr/wt/helpserver/provider/pom.xml | 10 | ||||
-rw-r--r-- | sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java | 25 |
5 files changed, 17 insertions, 26 deletions
diff --git a/sdnr/wt/helpserver/feature/pom.xml b/sdnr/wt/helpserver/feature/pom.xml index b5e7dafd8..08f0c63dc 100644 --- a/sdnr/wt/helpserver/feature/pom.xml +++ b/sdnr/wt/helpserver/feature/pom.xml @@ -29,7 +29,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>single-feature-parent</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> @@ -41,10 +41,12 @@ <name>ccsdk-features :: ${project.artifactId}</name> <dependencies> + <dependency> <groupId>${project.groupId}</groupId> <artifactId>sdnr-wt-helpserver-provider</artifactId> <version>${project.version}</version> </dependency> + </dependencies> </project> diff --git a/sdnr/wt/helpserver/installer/pom.xml b/sdnr/wt/helpserver/installer/pom.xml index 802079c15..654d7406a 100755 --- a/sdnr/wt/helpserver/installer/pom.xml +++ b/sdnr/wt/helpserver/installer/pom.xml @@ -29,7 +29,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> diff --git a/sdnr/wt/helpserver/pom.xml b/sdnr/wt/helpserver/pom.xml index 3c5d471d6..0fa2c3f7f 100755 --- a/sdnr/wt/helpserver/pom.xml +++ b/sdnr/wt/helpserver/pom.xml @@ -29,7 +29,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>odlparent-lite</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> diff --git a/sdnr/wt/helpserver/provider/pom.xml b/sdnr/wt/helpserver/provider/pom.xml index 5db0853ce..6cf2d03fd 100644 --- a/sdnr/wt/helpserver/provider/pom.xml +++ b/sdnr/wt/helpserver/provider/pom.xml @@ -29,7 +29,7 @@ <parent> <groupId>org.onap.ccsdk.parent</groupId> <artifactId>binding-parent</artifactId> - <version>2.1.0</version> + <version>2.1.1-SNAPSHOT</version> <relativePath/> </parent> @@ -42,13 +42,17 @@ <properties> <maven.javadoc.skip>true</maven.javadoc.skip> - <checkstyle.skip>true</checkstyle.skip> </properties> <dependencies> <dependency> + <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <artifactId>sdnr-wt-common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>javax.servlet</groupId> - <artifactId>servlet-api</artifactId> + <artifactId>javax.servlet-api</artifactId> </dependency> <dependency> <groupId>org.slf4j</groupId> diff --git a/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java b/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java index cd40e122b..c65002307 100644 --- a/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java +++ b/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java @@ -25,17 +25,16 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import java.io.File; import java.io.IOException; -import java.io.StringWriter; import java.nio.file.Files; import java.nio.file.OpenOption; import javax.servlet.ServletException; -import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; +import org.onap.ccsdk.features.sdnr.wt.common.test.ServletOutputStreamToStringWriter; import org.onap.ccsdk.features.sdnr.wt.helpserver.HelpServlet; import org.onap.ccsdk.features.sdnr.wt.helpserver.data.ExtactBundleResource; import org.onap.ccsdk.features.sdnr.wt.helpserver.data.HelpInfrastructureObject; @@ -87,14 +86,7 @@ public class TestMyServlet extends Mockito { when(request.getRequestURI()).thenReturn("help/"); when(request.getQueryString()).thenReturn("?meta"); - StringWriter stringWriter = new StringWriter(); - ServletOutputStream out = new ServletOutputStream() { - - @Override - public void write(int arg0) throws IOException { - stringWriter.write(arg0); - } - }; + ServletOutputStreamToStringWriter out = new ServletOutputStreamToStringWriter(); when(response.getOutputStream()).thenReturn(out); HelpServlet helpServlet = null; @@ -114,7 +106,7 @@ public class TestMyServlet extends Mockito { helpServlet.close(); } - String result = stringWriter.toString().trim(); + String result = out.getStringWriter().toString().trim(); System.out.println("Result: '" + result + "'"); assertEquals(CONTENT, result); } @@ -134,14 +126,7 @@ public class TestMyServlet extends Mockito { HttpServletResponse response = mock(HttpServletResponse.class); when(request.getRequestURI()).thenReturn("help/" + fn); - StringWriter sw = new StringWriter(); - ServletOutputStream out = new ServletOutputStream() { - - @Override - public void write(int arg0) throws IOException { - sw.write(arg0); - } - }; + ServletOutputStreamToStringWriter out = new ServletOutputStreamToStringWriter(); try { when(response.getOutputStream()).thenReturn(out); helpServlet.doGet(request, response); @@ -157,6 +142,6 @@ public class TestMyServlet extends Mockito { } catch (Exception e) { } - assertEquals("compare content for " + fn, CONTENT, sw.toString().trim()); + assertEquals("compare content for " + fn, CONTENT, out.getStringWriter().toString().trim()); } } |