use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ProcessorAPITest method addProcessorWithEmptyChannelParameterToBridge.
@Test
@TestSecurity(user = TestConstants.DEFAULT_CUSTOMER_ID)
public void addProcessorWithEmptyChannelParameterToBridge() {
BridgeResponse bridgeResponse = createAndDeployBridge();
Action action = TestUtils.createKafkaAction();
action.setType(SlackAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(SlackAction.CHANNEL_PARAM, "");
params.put(SlackAction.WEBHOOK_URL_PARAM, "https://example.com");
action.setMapParameters(params);
Response response = TestUtils.addProcessorToBridge(bridgeResponse.getId(), new ProcessorRequest("myProcessor", null, null, action));
assertThat(response.getStatusCode()).isEqualTo(202);
}
use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class TestUtils method createKafkaAction.
public static Action createKafkaAction() {
Action r = new Action();
r.setType(KafkaTopicAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(KafkaTopicAction.TOPIC_PARAM, TestConstants.DEFAULT_KAFKA_TOPIC);
r.setMapParameters(params);
return r;
}
use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class TestUtils method createSendToBridgeAction.
public static Action createSendToBridgeAction(String bridgeId) {
Action r = new Action();
r.setType(SendToBridgeAction.TYPE);
Map<String, String> params = new HashMap<>();
params.put(SendToBridgeAction.BRIDGE_ID_PARAM, bridgeId);
r.setMapParameters(params);
return r;
}
use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionResolverTest method actionWithoutBridgeId.
private Action actionWithoutBridgeId() {
Action action = new Action();
action.setType(SendToBridgeAction.TYPE);
return action;
}
use of com.redhat.service.smartevents.infra.models.gateways.Action in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class SendToBridgeActionResolverTest method testActionWithoutOtherBridgeId.
@Test
void testActionWithoutOtherBridgeId() {
Action inputAction = actionWithoutBridgeId();
Action resolvedAction = resolver.resolve(inputAction, TEST_CUSTOMER_ID, OTHER_BRIDGE_ID, "");
assertValid(resolvedAction, OTHER_BRIDGE_WEBHOOK);
}
Aggregations