aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test
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-restrequestor/src/test
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-restrequestor/src/test')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumerTest.java78
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorProducerTest.java20
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java64
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json90
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json6
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json6
8 files changed, 187 insertions, 89 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumerTest.java
index ac1af67dd..07818d068 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorConsumerTest.java
@@ -25,23 +25,23 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
+import java.util.Properties;
+
import org.junit.Test;
import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
import org.onap.policy.apex.service.engine.event.ApexEventException;
import org.onap.policy.apex.service.engine.event.ApexEventReceiver;
-import org.onap.policy.apex.service.engine.event.ApexEventRuntimeException;
import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters;
import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
-import java.util.Properties;
-
/**
* Test the ApexRestRequestorConsumer class.
*
*/
public class ApexRestRequestorConsumerTest {
+
@Test
- public void testApexRestRequestorConsumerSetup() {
+ public void testApexRestRequestorConsumerSetup() throws ApexEventException {
ApexRestRequestorConsumer consumer = new ApexRestRequestorConsumer();
assertNotNull(consumer);
@@ -88,13 +88,10 @@ public class ApexRestRequestorConsumerTest {
rrctp.setHttpMethod(RestRequestorCarrierTechnologyParameters.HttpMethod.GET);
rrctp.setUrl("http://www.onap.org");
+ rrctp.setHttpCodeFilter("[1-5][0][0-5]");
consumerParameters.setPeerTimeout(EventHandlerPeeredMode.REQUESTOR, 0);
- try {
- consumer.init(consumerName, consumerParameters, incomingEventReceiver);
- } catch (ApexEventException aee) {
- fail("test should not throw an exception");
- }
+ consumer.init(consumerName, consumerParameters, incomingEventReceiver);
try {
consumer.processRestRequest(null);
@@ -110,7 +107,7 @@ public class ApexRestRequestorConsumerTest {
}
@Test
- public void testApexRestRequestorConsumerRequest() {
+ public void testApexRestRequestorConsumerRequest() throws ApexEventException {
ApexRestRequestorConsumer consumer = new ApexRestRequestorConsumer();
assertNotNull(consumer);
@@ -123,24 +120,21 @@ public class ApexRestRequestorConsumerTest {
consumerParameters.setPeeredMode(EventHandlerPeeredMode.REQUESTOR, true);
rrctp.setHttpMethod(RestRequestorCarrierTechnologyParameters.HttpMethod.GET);
rrctp.setUrl("http://www.onap.org");
+ rrctp.setHttpCodeFilter("[1-5][0][0-5]");
consumerParameters.setPeerTimeout(EventHandlerPeeredMode.REQUESTOR, 0);
// Test should time out requests
- try {
- consumer.init(consumerName, consumerParameters, incomingEventReceiver);
- consumer.start();
- ApexRestRequest request = new ApexRestRequest(123, null,"EventName", "Event body");
- consumer.processRestRequest(request);
- ThreadUtilities.sleep(2000);
- consumer.stop();
- assertEquals(0, consumer.getEventsReceived());
- } catch (ApexEventException aee) {
- fail("test should not throw an exception");
- }
+ consumer.init(consumerName, consumerParameters, incomingEventReceiver);
+ consumer.start();
+ ApexRestRequest request = new ApexRestRequest(123, null, "EventName", "Event body");
+ consumer.processRestRequest(request);
+ ThreadUtilities.sleep(200);
+ consumer.stop();
+ assertEquals(0, consumer.getEventsReceived());
}
@Test
- public void testApexRestRequestorConsumerUrlUpdate() {
+ public void testApexRestRequestorConsumerUrlUpdate() throws ApexEventException {
ApexRestRequestorConsumer consumer = new ApexRestRequestorConsumer();
assertNotNull(consumer);
@@ -158,21 +152,18 @@ public class ApexRestRequestorConsumerTest {
Properties properties = new Properties();
properties.put("site", "onap");
properties.put("net", "org");
- try {
- consumer.init(consumerName, consumerParameters, incomingEventReceiver);
- consumer.start();
- ApexRestRequest request = new ApexRestRequest(123, properties,"EventName", "Event body");
- consumer.processRestRequest(request);
- ThreadUtilities.sleep(2000);
- consumer.stop();
- assertEquals(0, consumer.getEventsReceived());
- } catch (Exception aee) {
- fail("test should not throw an exception");
- }
+
+ consumer.init(consumerName, consumerParameters, incomingEventReceiver);
+ consumer.start();
+ ApexRestRequest request = new ApexRestRequest(123, properties,"EventName", "Event body");
+ consumer.processRestRequest(request);
+ ThreadUtilities.sleep(2000);
+ consumer.stop();
+ assertEquals(0, consumer.getEventsReceived());
}
@Test
- public void testApexRestRequestorConsumerUrlUpdateError() {
+ public void testApexRestRequestorConsumerUrlUpdateError() throws ApexEventException {
ApexRestRequestorConsumer consumer = new ApexRestRequestorConsumer();
assertNotNull(consumer);
@@ -189,16 +180,13 @@ public class ApexRestRequestorConsumerTest {
consumerParameters.setPeerTimeout(EventHandlerPeeredMode.REQUESTOR, 2000);
Properties properties = new Properties();
properties.put("site", "onap");
- try {
- consumer.init(consumerName, consumerParameters, incomingEventReceiver);
- consumer.start();
- ApexRestRequest request = new ApexRestRequest(123, properties,"EventName", "Event body");
- consumer.processRestRequest(request);
- ThreadUtilities.sleep(2000);
- consumer.stop();
- assertEquals(0, consumer.getEventsReceived());
- } catch (Exception aee) {
- fail("test should not throw an exception");
- }
+
+ consumer.init(consumerName, consumerParameters, incomingEventReceiver);
+ consumer.start();
+ ApexRestRequest request = new ApexRestRequest(123, properties,"EventName", "Event body");
+ consumer.processRestRequest(request);
+ ThreadUtilities.sleep(2000);
+ consumer.stop();
+ assertEquals(0, consumer.getEventsReceived());
}
}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorProducerTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorProducerTest.java
index 5222f5bdb..af0074794 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorProducerTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/ApexRestRequestorProducerTest.java
@@ -39,7 +39,7 @@ import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMo
public class ApexRestRequestorProducerTest {
@Test
- public void testApexRestRequestorProducerMethods() {
+ public void testApexRestRequestorProducerMethods() throws ApexEventException {
ApexRestRequestorProducer producer = new ApexRestRequestorProducer();
assertNotNull(producer);
@@ -83,12 +83,8 @@ public class ApexRestRequestorProducerTest {
}
rrctp.setHttpMethod(null);
- try {
- producer.init(producerName, producerParameters);
- producer.stop();
- } catch (ApexEventException aee) {
- fail("test should not throw an exception here");
- }
+ producer.init(producerName, producerParameters);
+ producer.stop();
assertEquals("ProducerName", producer.getName());
assertEquals(0, producer.getEventsSent());
@@ -96,7 +92,7 @@ public class ApexRestRequestorProducerTest {
}
@Test
- public void testApexRestRequestorProducerRequest() {
+ public void testApexRestRequestorProducerRequest() throws ApexEventException {
ApexRestRequestorProducer producer = new ApexRestRequestorProducer();
String producerName = "ProducerName";
@@ -108,12 +104,8 @@ public class ApexRestRequestorProducerTest {
rrctp.setUrl(null);
rrctp.setHttpMethod(null);
- try {
- producer.init(producerName, producerParameters);
- producer.stop();
- } catch (ApexEventException aee) {
- fail("test should not throw an exception here");
- }
+ producer.init(producerName, producerParameters);
+ producer.stop();
String eventName = "EventName";
String event = "This is the event";
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java
index 68c6811b4..3044907fb 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/java/org/onap/policy/apex/plugins/event/carrier/restrequestor/RestRequestorCarrierTechnologyParametersTest.java
@@ -87,26 +87,40 @@ public class RestRequestorCarrierTechnologyParametersTest {
}
@Test
- public void testRestRequestorCarrierTechnologyParametersOk() {
+ public void testRestRequestorCarrierTechnologyParametersOk() throws ParameterException {
ApexCommandLineArguments arguments = new ApexCommandLineArguments();
arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json");
arguments.setRelativeFileRoot(".");
+ ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+
+ RestRequestorCarrierTechnologyParameters rrctp0 = (RestRequestorCarrierTechnologyParameters) parameters
+ .getEventInputParameters().get("RestRequestorConsumer0").getCarrierTechnologyParameters();
+ assertEquals(0, rrctp0.getHttpHeaders().length);
+
+ RestRequestorCarrierTechnologyParameters rrctp1 = (RestRequestorCarrierTechnologyParameters) parameters
+ .getEventInputParameters().get("RestRequestorConsumer1").getCarrierTechnologyParameters();
+ assertEquals(3, rrctp1.getHttpHeaders().length);
+ assertEquals("bbb", rrctp1.getHttpHeadersAsMultivaluedMap().get("aaa").get(0));
+ assertEquals("ddd", rrctp1.getHttpHeadersAsMultivaluedMap().get("ccc").get(0));
+ assertEquals("fff", rrctp1.getHttpHeadersAsMultivaluedMap().get("eee").get(0));
+ }
+
+ @Test
+ public void testRestClientCarrierTechnologyParameterFilterInvalid() {
+ ApexCommandLineArguments arguments = new ApexCommandLineArguments();
+ arguments.setConfigurationFilePath("src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json");
+ arguments.setRelativeFileRoot(".");
+
try {
+ new ApexParameterHandler().getParameters(arguments);
ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
RestRequestorCarrierTechnologyParameters rrctp0 = (RestRequestorCarrierTechnologyParameters) parameters
- .getEventInputParameters().get("RestRequestorConsumer0").getCarrierTechnologyParameters();
- assertEquals(0, rrctp0.getHttpHeaders().length);
-
- RestRequestorCarrierTechnologyParameters rrctp1 = (RestRequestorCarrierTechnologyParameters) parameters
- .getEventInputParameters().get("RestRequestorConsumer1").getCarrierTechnologyParameters();
- assertEquals(3, rrctp1.getHttpHeaders().length);
- assertEquals("bbb", rrctp1.getHttpHeadersAsMultivaluedMap().get("aaa").get(0));
- assertEquals("ddd", rrctp1.getHttpHeadersAsMultivaluedMap().get("ccc").get(0));
- assertEquals("fff", rrctp1.getHttpHeadersAsMultivaluedMap().get("eee").get(0));
+ .getEventInputParameters().get("RestRequestorConsumer0").getCarrierTechnologyParameters();
+ fail("test should throw an exception here");
} catch (ParameterException pe) {
- fail("test should not throw an exception");
+ assertTrue(pe.getMessage().contains("Invalid HTTP code filter, the filter must be specified as a three digit regular expression: "));
}
}
@@ -114,9 +128,15 @@ public class RestRequestorCarrierTechnologyParametersTest {
public void testGettersAndSetters() {
RestRequestorCarrierTechnologyParameters rrctp = new RestRequestorCarrierTechnologyParameters();
+ rrctp.setHttpHeaders(null);
+ assertEquals(null,rrctp.getHttpHeadersAsMultivaluedMap());
+
rrctp.setUrl("http://some.where");
assertEquals("http://some.where", rrctp.getUrl());
+ rrctp.setHttpCodeFilter("[1-5][0][0-5]");
+ assertEquals("[1-5][0][0-5]",rrctp.getHttpCodeFilter());
+
String[][] httpHeaders = new String[2][2];
httpHeaders[0][0] = "aaa";
httpHeaders[0][1] = "bbb";
@@ -143,8 +163,8 @@ public class RestRequestorCarrierTechnologyParametersTest {
assertEquals(RestRequestorCarrierTechnologyParameters.HttpMethod.DELETE, rrctp.getHttpMethod());
assertEquals("RESTRequestorCarrierTechnologyParameters "
- + "[url=http://some.where, httpMethod=DELETE, httpHeaders=[[aaa, bbb], [ccc, ddd]]]",
- rrctp.toString());
+ + "[url=http://some.where, httpMethod=DELETE, httpHeaders=[[aaa, bbb], [ccc, ddd]],"
+ + " httpCodeFilter=[1-5][0][0-5]]", rrctp.toString());
}
@Test
@@ -167,10 +187,10 @@ public class RestRequestorCarrierTechnologyParametersTest {
assertEquals("ccc", rrctp.getHttpHeaders()[1][0]);
assertEquals("ddd", rrctp.getHttpHeaders()[1][1]);
- assertEquals(true, rrctp.validateTagInUrl());
+ assertEquals(true, rrctp.validate().isValid());
rrctp.setUrl("http://{place}.{that}/is{that}.{one}");
- assertEquals(true, rrctp.validateTagInUrl());
+ assertEquals(true, rrctp.validate().isValid());
Set<String> keymap = rrctp.getKeysFromUrl();
assertEquals(true, keymap.contains("place"));
@@ -178,19 +198,19 @@ public class RestRequestorCarrierTechnologyParametersTest {
assertEquals(true, keymap.contains("one"));
rrctp.setUrl("http://{place.{that}/{is}.{not}/{what}.{exist}");
- assertEquals(false, rrctp.validateTagInUrl());
+ assertEquals(false, rrctp.validate().isValid());
rrctp.setUrl("http://{place}.{that}/{is}.{not}/{what}.{exist");
- assertEquals(false, rrctp.validateTagInUrl());
+ assertEquals(false, rrctp.validate().isValid());
rrctp.setUrl("http://place.that/is.not/what.{exist");
- assertEquals(false, rrctp.validateTagInUrl());
+ assertEquals(false, rrctp.validate().isValid());
rrctp.setUrl("http://place}.{that}/{is}.{not}/{what}.{exist}");
- assertEquals(false, rrctp.validateTagInUrl());
+ assertEquals(false, rrctp.validate().isValid());
rrctp.setUrl("http://{place}.{that}/is}.{not}/{what}.{exist}");
- assertEquals(false, rrctp.validateTagInUrl());
+ assertEquals(false, rrctp.validate().isValid());
rrctp.setUrl("http://{place}.{that}/{}.{not}/{what}.{exist}");
- assertEquals(false, rrctp.validateTagInUrl());
+ assertEquals(false, rrctp.validate().isValid());
rrctp.setUrl("http://{place}.{that}/{ }.{not}/{what}.{exist}");
- assertEquals(false, rrctp.validateTagInUrl());
+ assertEquals(false, rrctp.validate().isValid());
}
}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
new file mode 100644
index 000000000..d7a076346
--- /dev/null
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTClientWithHTTPFilterInvalid.json
@@ -0,0 +1,90 @@
+{
+ "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": {
+ "RestRequestorConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ],
+ "httpCodeFilter" : "*\\.*"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
+ "httpMethod": "GET",
+ "httpHeaders" : [
+ ["aaa", "bbb"],
+ ["ccc", "ddd"],
+ ["eee", "fff"]
+ ],
+ "httpCodeFilter" : " "
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "ResponseEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorProducer1",
+ "requestorTimeout": 2000
+ }
+ },
+ "eventOutputParameters": {
+ "RestRequestorProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer0",
+ "requestorTimeout": 2000
+ },
+ "RestRequestorProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTREQUESTOR",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "eventNameFilter": "RequestEvent",
+ "requestorMode": true,
+ "requestorPeer": "RestRequestorConsumer1",
+ "requestorTimeout": 2000
+ }
+ }
+}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
index ffe04422b..5fbee4404 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderBadList.json
@@ -25,7 +25,8 @@
"httpHeaders" : [
["aaa", "bbb"],
["ccc", "ddd"],
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -45,7 +46,8 @@
"httpMethod": "GET",
"httpHeaders" : [
,
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
index c1a195b43..f3fbab801 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNotKvPairs.json
@@ -24,7 +24,8 @@
"httpMethod": "GET",
"httpHeaders" : [
["aaa", "bbb", "ccc"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -44,7 +45,8 @@
"httpMethod": "GET",
"httpHeaders" : [
["aaa"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
index dd0484e8e..26059be00 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderNulls.json
@@ -25,7 +25,8 @@
"httpHeaders" : [
[null, "bbb"],
["ccc", "ddd"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -47,7 +48,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-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
index 504c77379..d1dc7d403 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restrequestor/src/test/resources/prodcons/RESTRequestorWithHTTPHeaderOK.json
@@ -23,7 +23,8 @@
"url": "http://localhost:32801/TestRESTRequestor/apex/event/GetEvent",
"httpMethod": "GET",
"httpHeaders" : [
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {
@@ -45,7 +46,8 @@
["aaa", "bbb"],
["ccc", "ddd"],
["eee", "fff"]
- ]
+ ],
+ "httpCodeFilter" : "[1-5][0][0-5]"
}
},
"eventProtocolParameters": {