Search in sources :

Example 6 with BaseNamedFlowEvent

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

the class IdBrokerMappingsDeleteHandlerTest 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_S3GUARD_TABLE_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 7 with BaseNamedFlowEvent

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

the class NetworkDeleteHandlerTest 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_IDBROKER_MAPPINGS_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 8 with BaseNamedFlowEvent

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

the class PublicKeyDeleteHandlerTest method verifyEnvDeleteEvent.

private void verifyEnvDeleteEvent() {
    BaseNamedFlowEvent event = baseNamedFlowEvent.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_NETWORK_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 9 with BaseNamedFlowEvent

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

the class PublicKeyDeleteHandlerTest method verifyEnvDeleteFailedEvent.

private void verifyEnvDeleteFailedEvent(Exception exceptionExpected) {
    BaseNamedFlowEvent event = baseNamedFlowEvent.getValue();
    assertThat(event).isInstanceOf(EnvDeleteFailedEvent.class);
    EnvDeleteFailedEvent envDeleteFailedEvent = (EnvDeleteFailedEvent) event;
    assertThat(envDeleteFailedEvent.getResourceName()).isEqualTo(ENVIRONMENT_NAME);
    assertThat(envDeleteFailedEvent.getResourceCrn()).isEqualTo(ENVIRONMENT_CRN);
    assertThat(envDeleteFailedEvent.getResourceId()).isEqualTo(ENVIRONMENT_ID);
    assertThat(envDeleteFailedEvent.selector()).isEqualTo(FAILED_ENV_DELETE_EVENT.selector());
    assertThat(envDeleteFailedEvent.getException()).isSameAs(exceptionExpected);
    assertThat(headersArgumentCaptor.getValue()).isSameAs(headers);
}
Also used : BaseNamedFlowEvent(com.sequenceiq.flow.reactor.api.event.BaseNamedFlowEvent) EnvDeleteFailedEvent(com.sequenceiq.environment.environment.flow.deletion.event.EnvDeleteFailedEvent)

Example 10 with BaseNamedFlowEvent

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

the class RdbmsDeleteHandlerTest 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_ENVIRONMENT_RESOURCE_ENCRYPTION_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)

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