summaryrefslogtreecommitdiffstats
path: root/src/test/resources
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/resources')
-rw-r--r--src/test/resources/application.properties5
-rwxr-xr-xsrc/test/resources/http-cache/third_party_proxy.py12
2 files changed, 17 insertions, 0 deletions
diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties
index ecc40331f..061505a12 100644
--- a/src/test/resources/application.properties
+++ b/src/test/resources/application.properties
@@ -217,6 +217,11 @@ clamp.config.dcae.dispatcher.url=http://localhost:${docker.http-cache.port.host}
clamp.config.dcae.dispatcher.retry.interval=100
clamp.config.dcae.dispatcher.retry.limit=1
+#DCAE Deployment Url Properties
+clamp.config.dcae.deployment.url=http4://localhost:${docker.http-cache.port.host}
+clamp.config.dcae.deployment.userName=test
+clamp.config.dcae.deployment.password=test
+
#Define user permission related parameters, the permission type can be changed but MUST be redefined in clds-users.properties in that case !
clamp.config.security.permission.type.cl=permission-type-cl
clamp.config.security.permission.type.cl.manage=permission-type-cl-manage
diff --git a/src/test/resources/http-cache/third_party_proxy.py b/src/test/resources/http-cache/third_party_proxy.py
index f19aa0da4..0db977bb4 100755
--- a/src/test/resources/http-cache/third_party_proxy.py
+++ b/src/test/resources/http-cache/third_party_proxy.py
@@ -199,6 +199,18 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
with open(cached_file_content, 'w+') as f:
f.write(self.data_string)
return True
+ elif self.path.startswith("/policy/api/v1/policytypes/") and http_type == "GET":
+ print "self.path start with /policy/api/v1/policytypes/, generating response json..."
+ jsonGenerated = "{\"policyTypeId\": \"onap.policies.controlloop.operational\",\"policyTypeVersion\": \"1.0.0\",\"policyId\": \"OPERATIONAL_z711F_v1_0_ResourceInstanceName1_tca\"}"
+ print "jsonGenerated: " + jsonGenerated
+ if not os.path.exists(cached_file_folder):
+ os.makedirs(cached_file_folder, 0777)
+
+ with open(cached_file_header, 'w') as f:
+ f.write("{\"Content-Length\": \"" + str(len(jsonGenerated)) + "\", \"Content-Type\": \"application/json\"}")
+ with open(cached_file_content, 'w') as f:
+ f.write(jsonGenerated)
+ return True
else:
return False