aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/apigateway/provider/src/test
diff options
context:
space:
mode:
authorherbert <herbert.eiselt@highstreet-technologies.com>2019-12-14 00:22:47 +0100
committerherbert <herbert.eiselt@highstreet-technologies.com>2019-12-16 10:35:58 +0100
commit7ce54d65de834d2901285e152c42044e8136c473 (patch)
tree652e29e86489a9a5390db06a34c79833e0fda9b3 /sdnr/wt/apigateway/provider/src/test
parentda4fd6169717cfa04d644d0af0d23dd089a6e373 (diff)
update old version
of apigateway common data-provider helpserver websocketmanager2 Issue-ID: SDNC-1005 Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com> Change-Id: I13990aa4329810bb7a7dd815e6149e9890617d07 Signed-off-by: herbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/apigateway/provider/src/test')
-rw-r--r--sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestDatabaseHttpClient.java17
-rw-r--r--sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestHttpClient.java17
-rw-r--r--sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestProperties.java19
-rw-r--r--sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestQueryCallback.java17
4 files changed, 64 insertions, 6 deletions
diff --git a/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestDatabaseHttpClient.java b/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestDatabaseHttpClient.java
index 795228834..791e9bad0 100644
--- a/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestDatabaseHttpClient.java
+++ b/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestDatabaseHttpClient.java
@@ -1,3 +1,20 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
package org.onap.ccsdk.features.sdnr.wt.apigateway.test;
import static org.junit.Assert.*;
diff --git a/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestHttpClient.java b/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestHttpClient.java
index 6e21bc133..18e84853a 100644
--- a/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestHttpClient.java
+++ b/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestHttpClient.java
@@ -1,3 +1,20 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
package org.onap.ccsdk.features.sdnr.wt.apigateway.test;
import static org.junit.Assert.fail;
diff --git a/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestProperties.java b/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestProperties.java
index 1a63240d8..6efd06feb 100644
--- a/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestProperties.java
+++ b/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestProperties.java
@@ -27,6 +27,8 @@ import java.io.File;
import java.util.HashMap;
import java.util.Map;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.apigateway.MyProperties;
@@ -38,7 +40,7 @@ public class TestProperties {
private static final boolean DEFAULT_TRUSTINSECURE = false;
private static final String DEFAULT_AAIBASEURL = "off";
private static Map<String, String> DEFAULT_AAIHEADERS = new HashMap<String, String>();
- private static final String DEFAULT_ESBASEURL = "http://localhost:9200";
+ private static final String DEFAULT_ESBASEURL = "http://sdnrdb:9200";
private static final boolean CUSTOM_CORSENABLED = true;
private static final boolean CUSTOM_AAIOFF = false;
@@ -49,10 +51,18 @@ public class TestProperties {
private static final String CUSTOM_ESBASEURL = "http://localhost:9200";
private static final String LR = "\n";
-
+ final String tmpFilename = "tmp2.cfg";
+
+ @Before
+ @After
+ public void init() {
+ File f = new File(tmpFilename);
+ if(f.exists()) {
+ f.delete();
+ }
+ }
@Test
public void test() {
- final String tmpFilename = "tmp2.cfg";
DEFAULT_AAIHEADERS.put("X-FromAppId", "SDNR");
DEFAULT_AAIHEADERS.put("Authorization", "Basic QUFJOkFBSQ==");
CUSTOM_AAIHEADERS.put("X-FromAppId", "SDNC");
@@ -62,9 +72,6 @@ public class TestProperties {
+ "\"]" + LR + "database=" + CUSTOM_ESBASEURL + LR + "insecure=" + (CUSTOM_TRUSTINSECURE ? "1" : "0")
+ LR + "cors=" + (CUSTOM_CORSENABLED ? "1" : "0");
File ftest = new File(tmpFilename);
- // delete autogenerated testfile
- if (ftest.exists())
- ftest.delete();
MyProperties prop = null;
ftest = new File(tmpFilename);
try {
diff --git a/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestQueryCallback.java b/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestQueryCallback.java
index 78341dfad..3340ec66c 100644
--- a/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestQueryCallback.java
+++ b/sdnr/wt/apigateway/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/apigateway/test/TestQueryCallback.java
@@ -1,3 +1,20 @@
+/*******************************************************************************
+ * ============LICENSE_START========================================================================
+ * ONAP : ccsdk feature sdnr wt
+ * =================================================================================================
+ * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
+ * =================================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ * ============LICENSE_END==========================================================================
+ ******************************************************************************/
package org.onap.ccsdk.features.sdnr.wt.apigateway.test;
import static org.junit.Assert.*;