From 0d63d99ea283749d2b5c24b073b585faf8a62e7b Mon Sep 17 00:00:00 2001 From: Marcus G K Williams Date: Fri, 1 Sep 2017 15:44:56 -0700 Subject: Enable surefire unit testing Issue-Id: CCSDK-67 Change-Id: I3d03ff1a3e312edd4af7ab69508760d2fe49be78 Signed-off-by: Marcus G K Williams --- pom.xml | 2 +- .../test/java/org/onap/ccsdk/sli/core/slipluginutils/Dme2Test.java | 6 +++--- sliPluginUtils/provider/src/test/resources/dme2.e2e.properties | 7 +++++++ sliPluginUtils/provider/src/test/resources/dme2.prod.properties | 7 +++++++ 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 sliPluginUtils/provider/src/test/resources/dme2.e2e.properties create mode 100644 sliPluginUtils/provider/src/test/resources/dme2.prod.properties diff --git a/pom.xml b/pom.xml index 3c01ec987..c0c63412a 100755 --- a/pom.xml +++ b/pom.xml @@ -100,7 +100,7 @@ maven-surefire-plugin 2.17 - true + false diff --git a/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/Dme2Test.java b/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/Dme2Test.java index 48c32f452..97346549e 100644 --- a/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/Dme2Test.java +++ b/sliPluginUtils/provider/src/test/java/org/onap/ccsdk/sli/core/slipluginutils/Dme2Test.java @@ -34,7 +34,7 @@ public class Dme2Test { @Test public void createInstarUrl() { - String instarUrl = "http://localhost:25055/service=sample.com/services/eim/v1/rest/version=1702.0/envContext=TEST/routeOffer=DEFAULT/subContext=/enterpriseConnection/getEnterpriseConnectionDetails/v1?dme2.password=fake&dme2.username=user@sample.com"; + String instarUrl = "http://localhost:25055/service=sample.com/services/eim/v1/rest/version=1702.0/envContext=TEST/routeOffer=DEFAULT/subContext=/enterpriseConnection/getEnterpriseConnectionDetails/v1?dme2.password=fake&dme2.username=user@sample.com&dme2.allowhttpcode=true"; DME2 dme = new DME2("user@sample.com", "fake", "TEST", "DEFAULT", new String[] { "http://localhost:25055" }, "common"); String constructedUrl = dme.constructUrl("sample.com/services/eim/v1/rest", "1702.0", "/enterpriseConnection/getEnterpriseConnectionDetails/v1"); assertEquals(instarUrl, constructedUrl); @@ -42,7 +42,7 @@ public class Dme2Test { @Test public void createInstarUrlNoSubContext() { - String instarUrl = "http://localhost:25055/service=sample.com/services/eim/v1/rest/version=1702.0/envContext=TEST/routeOffer=DEFAULT?dme2.password=fake&dme2.username=user@sample.com"; + String instarUrl = "http://localhost:25055/service=sample.com/services/eim/v1/rest/version=1702.0/envContext=TEST/routeOffer=DEFAULT?dme2.password=fake&dme2.username=user@sample.com&dme2.allowhttpcode=true"; DME2 dme = new DME2("user@sample.com", "fake", "TEST", "DEFAULT", new String[] { "http://localhost:25055" }, "common"); Map parameters = new HashMap(); String constructedUrl = dme.constructUrl("sample.com/services/eim/v1/rest", "1702.0", parameters.get(null)); @@ -52,7 +52,7 @@ public class Dme2Test { @Test public void testRoundRobin() { String[] proxyHostNames = new String[] { "http://one:25055", "http://two:25055", "http://three:25055" }; - String urlSuffix = "/service=sample.com/services/eim/v1/rest/version=1702.0/envContext=TEST/routeOffer=DEFAULT/subContext=/enterpriseConnection/getEnterpriseConnectionDetails/v1?dme2.password=fake&dme2.username=user@sample.com"; + String urlSuffix = "/service=sample.com/services/eim/v1/rest/version=1702.0/envContext=TEST/routeOffer=DEFAULT/subContext=/enterpriseConnection/getEnterpriseConnectionDetails/v1?dme2.password=fake&dme2.username=user@sample.com&dme2.allowhttpcode=true"; DME2 dme = new DME2("user@sample.com", "fake", "TEST", "DEFAULT", proxyHostNames, "common"); String constructedUrl = dme.constructUrl("sample.com/services/eim/v1/rest", "1702.0", "/enterpriseConnection/getEnterpriseConnectionDetails/v1"); assertEquals(proxyHostNames[0] + urlSuffix, constructedUrl); diff --git a/sliPluginUtils/provider/src/test/resources/dme2.e2e.properties b/sliPluginUtils/provider/src/test/resources/dme2.e2e.properties new file mode 100644 index 000000000..373448447 --- /dev/null +++ b/sliPluginUtils/provider/src/test/resources/dme2.e2e.properties @@ -0,0 +1,7 @@ +aafUserName=user@sample.com +aafPassword=fake +envContext=UAT +routeOffer=UAT +proxyUrl=http://sample.com:25055,http://sample.com:25055 +commonServiceVersion=1702.0 +partner= \ No newline at end of file diff --git a/sliPluginUtils/provider/src/test/resources/dme2.prod.properties b/sliPluginUtils/provider/src/test/resources/dme2.prod.properties new file mode 100644 index 000000000..4326b0048 --- /dev/null +++ b/sliPluginUtils/provider/src/test/resources/dme2.prod.properties @@ -0,0 +1,7 @@ +aafUserName=user@sample.com +aafPassword=fake +envContext=PROD +routeOffer= +proxyUrl=http://sample.com:25055,http://sample.com:25055 +commonServiceVersion=1.0 +partner=LPP_PROD \ No newline at end of file -- cgit 1.2.3-korg