Search in sources :

Example 11 with BaseNamedFlowEvent

use of com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent in project cloudbreak by hortonworks.

the class ResourceEncryptionDeleteHandlerTest method verifyEnvDeleteEvent.

private void verifyEnvDeleteEvent() {
    BaseNamedFlowEvent event = baseNamedFlowEventCaptor.getValue();
    assertThat(event).isInstanceOf(EnvDeleteEvent.class);
    EnvDeleteEvent envDeleteEvent = (EnvDeleteEvent) event;
    assertThat(envDeleteEvent.getResourceName()).isEqualTo(ENVIRONMENT_NAME);
    assertThat(envDeleteEvent.getResourceCrn()).isEqualTo(ENVIRONMENT_CRN);
    assertThat(envDeleteEvent.getResourceId()).isEqualTo(ENVIRONMENT_ID);
    assertThat(envDeleteEvent.selector()).isEqualTo(START_PUBLICKEY_DELETE_EVENT.selector());
    assertThat(headersArgumentCaptor.getValue()).isSameAs(headers);
}
Also used : BaseNamedFlowEvent(com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent) EnvDeleteEvent(com.sequenceiq.environment.environment.flow.deletion.event.EnvDeleteEvent)

Example 12 with BaseNamedFlowEvent

use of com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent in project cloudbreak by hortonworks.

the class S3GuardTableDeleteHandlerTest method verifyEnvDeleteEvent.

private void verifyEnvDeleteEvent() {
    BaseNamedFlowEvent event = eventArgumentCaptor.getValue();
    assertThat(event).isInstanceOf(EnvDeleteEvent.class);
    EnvDeleteEvent envDeleteEvent = (EnvDeleteEvent) event;
    assertThat(envDeleteEvent.getResourceName()).isEqualTo(ENVIRONMENT_NAME);
    assertThat(envDeleteEvent.getResourceCrn()).isEqualTo(ENVIRONMENT_CRN);
    assertThat(envDeleteEvent.getResourceId()).isEqualTo(ENVIRONMENT_ID);
    assertThat(envDeleteEvent.selector()).isEqualTo(START_CLUSTER_DEFINITION_CLEANUP_EVENT.selector());
    assertThat(headersArgumentCaptor.getValue()).isSameAs(headers);
}
Also used : BaseNamedFlowEvent(com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent) EnvDeleteEvent(com.sequenceiq.environment.environment.flow.deletion.event.EnvDeleteEvent)

Aggregations

BaseNamedFlowEvent (com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent)12 EnvDeleteEvent (com.sequenceiq.environment.environment.flow.deletion.event.EnvDeleteEvent)7 EnvDeleteFailedEvent (com.sequenceiq.environment.environment.flow.deletion.event.EnvDeleteFailedEvent)3 EnvCreationEvent (com.sequenceiq.environment.environment.flow.creation.event.EnvCreationEvent)2