aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources
diff options
context:
space:
mode:
authorHenry.Sun <henry.a.sun@est.tech>2019-07-12 15:49:30 +0000
committerHenry.Sun <henry.a.sun@est.tech>2019-07-12 15:49:30 +0000
commit9e4e4474ee079176b26ed0af7105a4b23540d585 (patch)
tree80d7ad4b1172447a7703af4f27fd2b7ed5293548 /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources
parent8916bd3e643daeba1b09f6b04f831ac92962537d (diff)
add status filter in restclient and restrequestor
Issue-ID: POLICY-1742 Change-Id: Ib4984b18c0353cddb12c13c352277728be691bf5 Signed-off-by: Henry.Sun <henry.a.sun@est.tech>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json75
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json12
5 files changed, 95 insertions, 10 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
new file mode 100644
index 000000000..490767186
--- /dev/null
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
@@ -0,0 +1,75 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "src/test/resources/policymodels/RequestorModel.json",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "RestClientConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ["aaa", "bbb"],
+ ["ccc", "ddd"]
+ ],
+ "httpCodeFilter" : "*\\.*"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "RestClientConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ["aaa", "bbb"],
+ ["ccc", "ddd"]
+ ],
+ "httpCodeFilter" : " "
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "RestClientProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "RestClientProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json
index a3969aead..be0729f6c 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderBadList.json
@@ -25,7 +25,8 @@
"httpHeaders" : [
["aaa", "bbb"],
["ccc", "ddd"],
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -41,7 +42,8 @@
"httpMethod": "GET",
"httpHeaders" : [
,
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json
index 790a9bc38..c41ff1cb4 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNotKvPairs.json
@@ -24,7 +24,8 @@
"httpMethod": "GET",
"httpHeaders" : [
["aaa", "bbb", "ccc"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -40,7 +41,8 @@
"httpMethod": "GET",
"httpHeaders" : [
["aaa"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json
index 4b99ca0c2..bc9988633 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderNulls.json
@@ -25,7 +25,8 @@
"httpHeaders" : [
[null, "bbb"],
["ccc", "ddd"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
}
},
@@ -40,7 +41,8 @@
["aaa", "bbb"],
["ccc", null],
["eee", "fff"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json
index 1c4a39d99..3586b4481 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/test/resources/prodcons/RESTClientWithHTTPHeaderOK.json
@@ -23,7 +23,8 @@
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
"httpHeaders" : [
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -41,7 +42,8 @@
["aaa", "bbb"],
["ccc", "ddd"],
["eee", "fff"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -58,7 +60,8 @@
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
"httpHeaders" : [
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -76,7 +79,8 @@
["aaa", "bbb"],
["ccc", "ddd"],
["eee", "fff"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {