aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/test/resources
diff options
context:
space:
mode:
authorbrunomilitzer <bruno.militzer@est.tech>2021-11-18 10:26:50 +0000
committerbrunomilitzer <bruno.militzer@est.tech>2021-11-18 11:35:35 +0000
commita72ce28fb60c1903ed3ef3da6bb3faac1ae801ba (patch)
tree3e414037e597133f3881fdc0a17d21b100006ee4 /runtime/src/test/resources
parent0b59c6652adac854fb524aa8cd1854f4672ceeac (diff)
Added Camel Unit Tests
Added Camel Unit Tests to test creation of instance properties Updated credentials for Rest End point Issue-ID: POLICY-3565 Change-Id: I0899d3052588822f02a8a003eb4bc406bc887713 Signed-off-by: brunomilitzer <bruno.militzer@est.tech>
Diffstat (limited to 'runtime/src/test/resources')
-rw-r--r--runtime/src/test/resources/application.properties6
-rw-r--r--runtime/src/test/resources/http-cache/third_party_proxy.py9
-rw-r--r--runtime/src/test/resources/robotframework/robotframework-test.properties4
3 files changed, 14 insertions, 5 deletions
diff --git a/runtime/src/test/resources/application.properties b/runtime/src/test/resources/application.properties
index bc0c290db..f2cf0dd33 100644
--- a/runtime/src/test/resources/application.properties
+++ b/runtime/src/test/resources/application.properties
@@ -139,10 +139,10 @@ clamp.config.httpclient.connectTimeout=10000
#
# Configuration Settings for Policy Engine Components
clamp.config.policy.api.url=http://localhost:${docker.http-cache.port.host}
-clamp.config.policy.api.userName=healthcheck
+clamp.config.policy.api.userName=policyadmin
clamp.config.policy.api.password=zb!XztG34
clamp.config.policy.pap.url=http://localhost:${docker.http-cache.port.host}
-clamp.config.policy.pap.userName=healthcheck
+clamp.config.policy.pap.userName=policyadmin
clamp.config.policy.pap.password=zb!XztG34
# Sdc service properties
@@ -183,5 +183,5 @@ clamp.config.tosca.converter.dictionary.support.enabled=true
# Configuration settings for ControlLoop Runtime Rest API
clamp.config.controlloop.runtime.url=http://localhost:${docker.http-cache.port.host}
-clamp.config.controlloop.runtime.userName=healthcheck
+clamp.config.controlloop.runtime.userName=runtimeUser
clamp.config.controlloop.runtime.password=zb!XztG34
diff --git a/runtime/src/test/resources/http-cache/third_party_proxy.py b/runtime/src/test/resources/http-cache/third_party_proxy.py
index 5c80cdda4..67af21470 100644
--- a/runtime/src/test/resources/http-cache/third_party_proxy.py
+++ b/runtime/src/test/resources/http-cache/third_party_proxy.py
@@ -331,6 +331,15 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
jsonGenerated = "{\"controlLoopList\": [{\"name\": \"PMSHInstance0\",\"version\": \"1.0.1\",\"definition\": {},\"state\": \"UNINITIALISED\",\"orderedState\": \"UNINITIALISED\",\"description\": \"PMSH control loop instance 0\",\"elements\": {}}]}";
self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content)
return True
+ elif (self.path.startswith("/onap/controlloop/v2/instanceProperties")) and http_type == "POST":
+ print("self.path start with POST /onap/controlloop/v2/instanceProperties, copying body to response ...")
+ if not os.path.exists(cached_file_folder):
+ os.makedirs(cached_file_folder, 0o777)
+ with open(cached_file_header, 'w+') as f:
+ f.write("{\"Content-Length\": \"" + str(len(self.data_string)) + "\", \"Content-Type\": \""+str(self.headers['Content-Type'])+"\"}")
+ with open(cached_file_content, 'w+') as f:
+ f.write(self.data_string)
+ return True
else:
return False
diff --git a/runtime/src/test/resources/robotframework/robotframework-test.properties b/runtime/src/test/resources/robotframework/robotframework-test.properties
index 499719aa6..493c83c3d 100644
--- a/runtime/src/test/resources/robotframework/robotframework-test.properties
+++ b/runtime/src/test/resources/robotframework/robotframework-test.properties
@@ -136,10 +136,10 @@ clamp.config.httpclient.connectTimeout=10000
#
# Configuration Settings for Policy Engine Components
clamp.config.policy.api.url=http://localhost:${docker.http-cache.port.host}
-clamp.config.policy.api.userName=healthcheck
+clamp.config.policy.api.userName=policyadmin
clamp.config.policy.api.password=zb!XztG34
clamp.config.policy.pap.url=http://localhost:${docker.http-cache.port.host}
-clamp.config.policy.pap.userName=healthcheck
+clamp.config.policy.pap.userName=policyadmin
clamp.config.policy.pap.password=zb!XztG34
# Sdc service properties