diff options
author | brunomilitzer <bruno.militzer@est.tech> | 2021-11-22 17:42:40 +0000 |
---|---|---|
committer | brunomilitzer <bruno.militzer@est.tech> | 2021-11-22 17:45:22 +0000 |
commit | bb4a2a1b856bce7ea3d9ede8f8fe8e279f3f0d75 (patch) | |
tree | 86da4ee82e747266775a732735ce06bec48c39ec /runtime/src/test/resources | |
parent | 226d4c344baa504d90ba7a3a4f3e17733ebc1df8 (diff) |
Added Camel Unit Tests
Added two camel unit tests related to deleting
tosca instance properties and the other to change
the order state.
Removed name and version paramaters in create instance properties
camel rest endpoint.
Issue-ID: POLICY-3568
Change-Id: I6cec03545263055eb7c6be2798dd5c8fe5a646b6
Signed-off-by: brunomilitzer <bruno.militzer@est.tech>
Diffstat (limited to 'runtime/src/test/resources')
-rw-r--r-- | runtime/src/test/resources/http-cache/third_party_proxy.py | 10 |
1 files changed, 10 insertions, 0 deletions
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 67af21470..786c366e0 100644 --- a/runtime/src/test/resources/http-cache/third_party_proxy.py +++ b/runtime/src/test/resources/http-cache/third_party_proxy.py @@ -340,6 +340,16 @@ class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler): with open(cached_file_content, 'w+') as f: f.write(self.data_string) return True + elif (self.path.startswith("/onap/controlloop/v2/instanceProperties")) and http_type == "DELETE": + print("self.path start with /instanceProperties Deleting instance properties, generating response json...") + jsonGenerated = "{\"errorDetails\": null,\"affectedControlLoopDefinitions\": [{ \"name\": \"PMSH_Instance1\", \"version\": \"2.3.1\" }]}" + self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content) + return True + elif (self.path.startswith("/onap/controlloop/v2/instantiation/command")) and http_type == "PUT": + print("self.path start with /instantiation/command Changing order state, generating response json...") + jsonGenerated = "{\"orderedState\":\"PASSIVE\",\"controlLoopIdentifierList\":[{\"name\":\"PMSH_Instance1\",\"version\":\"2.3.1\"}]}" + self._create_cache(jsonGenerated, cached_file_folder, cached_file_header, cached_file_content) + return True else: return False |