From aa484450032b5eaa85bbc33ec0dad3d9995f3d58 Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 11 Feb 2020 18:58:35 +0100 Subject: Add tests Add tests for download all and improve efficiency with stream Issue-ID: CLAMP-518 Change-Id: Ia78ed8da7e54eaeaaed4fb87f483e0aff3a4a8c4 Signed-off-by: sebdet --- src/test/resources/application.properties | 5 -- .../.file | 60 ++++++++++++++++++++++ .../.header | 1 + .../example/policy/api/v1/policytypes/.file | 60 ---------------------- .../example/policy/api/v1/policytypes/.header | 1 - 5 files changed, 61 insertions(+), 66 deletions(-) create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file create mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.header delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/.file delete mode 100644 src/test/resources/http-cache/example/policy/api/v1/policytypes/.header (limited to 'src/test/resources') diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index 17c42f56..5b921e9e 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -21,11 +21,6 @@ # ### -info.build.artifact=@project.artifactId@ -info.build.name=@project.name@ -info.build.description=@project.description@ -info.build.version=@project.version@ - ### Set the port for HTTP or HTTPS protocol (Controlled by Spring framework, only one at a time). ### (See below for the parameter 'server.http.port' if you want to have both enabled) ### To have only HTTP, keep the lines server.ssl.* commented diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file new file mode 100644 index 00000000..ab3b40e2 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.file @@ -0,0 +1,60 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 +policy_types: + - onap.policies.Monitoring: + version: 1.0.0 + description: A base policy type for all policies that govern monitoring provision + derived_from: tosca.policies.Root + properties: + # Omitted for brevity, see Section 1 + + - onap.policies.controlloop.Operational: + version: 1.0.0 + description: Operational Policy for Control Loops + derived_from: tosca.policies.Root + properties: + # Omitted for brevity, see Section 1 + + - onap.policies.controloop.operational.Drools: + version: 1.0.0 + description: Operational Policy for Control Loops using the Drools PDP + derived_from: onap.policies.controlloop.Operational + properties: + # Omitted for brevity, see Section 1 + + - onap.policies.controloop.operational.Apex: + version: 1.0.0 + description: Operational Policy for Control Loops using the APEX PDP + derived_from: onap.policies.controlloop.Operational + properties: + # Omitted for brevity, see Section 1 + + - onap.policies.controlloop.Guard: + version: 1.0.0 + description: Operational Policy for Control Loops + derived_from: tosca.policies.Root + properties: + # Omitted for brevity, see Section 1 + + - onap.policies.controlloop.guard.FrequencyLimiter: + version: 1.0.0 + description: Supports limiting the frequency of actions being taken by a Actor. + derived_from: onap.policies.controlloop.Guard + properties: + # Omitted for brevity, see Section 1 + + - onap.policies.controlloop.guard.Blacklist: + version: 1.0.0 + description: Supports blacklist of VNF's from performing control loop actions on. + derived_from: onap.policies.controlloop.Guard + properties: + # Omitted for brevity, see Section 1 + + - onap.policies.controlloop.guard.MinMax: + version: 1.0.0 + description: Supports Min/Max number of VF Modules + derived_from: onap.policies.controlloop.Guard + properties: + # Omitted for brevity, see Section 1 + +data_types: + # Any bespoke data types referenced by policy type definitions[] diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.header new file mode 100644 index 00000000..6a280d97 --- /dev/null +++ b/src/test/resources/http-cache/example/policy/api/v1/policytypes?connectionTimeToLive=5000/.header @@ -0,0 +1 @@ +{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/.file b/src/test/resources/http-cache/example/policy/api/v1/policytypes/.file deleted file mode 100644 index 7394d3f9..00000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/.file +++ /dev/null @@ -1,60 +0,0 @@ -tosca_definitions_version: tosca_simple_yaml_1_0_0 -policy_types: - - onap.policies.Monitoring: - version: 1.0.0 - description: A base policy type for all policies that govern monitoring provision - derived_from: tosca.policies.Root - properties: - # Omitted for brevity, see Section 1 - - - onap.policies.controlloop.Operational: - version: 1.0.0 - description: Operational Policy for Control Loops - derived_from: tosca.policies.Root - properties: - # Omitted for brevity, see Section 1 - - - onap.policies.controloop.operational.Drools: - version: 1.0.0 - description: Operational Policy for Control Loops using the Drools PDP - derived_from: onap.policies.controlloop.Operational - properties: - # Omitted for brevity, see Section 1 - - - onap.policies.controloop.operational.Apex: - version: 1.0.0 - description: Operational Policy for Control Loops using the APEX PDP - derived_from: onap.policies.controlloop.Operational - properties: - # Omitted for brevity, see Section 1 - - - onap.policies.controlloop.Guard: - version: 1.0.0 - description: Operational Policy for Control Loops - derived_from: tosca.policies.Root - properties: - # Omitted for brevity, see Section 1 - - - onap.policies.controlloop.guard.FrequencyLimiter: - version: 1.0.0 - description: Supports limiting the frequency of actions being taken by a Actor. - derived_from: onap.policies.controlloop.Guard - properties: - # Omitted for brevity, see Section 1 - - - onap.policies.controlloop.guard.Blacklist: - version: 1.0.0 - description: Supports blacklist of VNF's from performing control loop actions on. - derived_from: onap.policies.controlloop.Guard - properties: - # Omitted for brevity, see Section 1 - - - onap.policies.controlloop.guard.MinMax: - version: 1.0.0 - description: Supports Min/Max number of VF Modules - derived_from: onap.policies.controlloop.Guard - properties: - # Omitted for brevity, see Section 1 - -data_types: - # Any bespoke data types referenced by policy type definitions[] diff --git a/src/test/resources/http-cache/example/policy/api/v1/policytypes/.header b/src/test/resources/http-cache/example/policy/api/v1/policytypes/.header deleted file mode 100644 index 6a280d97..00000000 --- a/src/test/resources/http-cache/example/policy/api/v1/policytypes/.header +++ /dev/null @@ -1 +0,0 @@ -{"Transfer-Encoding": "chunked", "Set-Cookie": "JSESSIONID=158qxkdtdobkd1umr3ikkgrmlx;Path=/", "Expires": "Thu, 01 Jan 1970 00:00:00 GMT", "Server": "Jetty(9.3.21.v20170918)", "Content-Type": "application/json", "X-ECOMP-RequestID": "e2ddb3c8-994f-47df-b4dc-097d4fb55c08"} \ No newline at end of file -- cgit 1.2.3-korg