Search in sources :

Example 1 with ApplicationEvent

use of org.cloudfoundry.operations.applications.ApplicationEvent in project cf-java-client by cloudfoundry.

the class ApplicationsTest method getEvents.

@Test
public void getEvents() throws IOException {
    String applicationName = this.nameFactory.getApplicationName();
    createApplication(this.cloudFoundryOperations, new ClassPathResource("test-application.zip").getFile().toPath(), applicationName, true).thenMany(this.cloudFoundryOperations.applications().getEvents(GetApplicationEventsRequest.builder().name(applicationName).build()).next()).map(ApplicationEvent::getEvent).as(StepVerifier::create).expectNext("audit.app.update").expectComplete().verify(Duration.ofMinutes(5));
}
Also used : ApplicationEvent(org.cloudfoundry.operations.applications.ApplicationEvent) ClassPathResource(org.springframework.core.io.ClassPathResource) AbstractIntegrationTest(org.cloudfoundry.AbstractIntegrationTest) Test(org.junit.Test)

Aggregations

AbstractIntegrationTest (org.cloudfoundry.AbstractIntegrationTest)1 ApplicationEvent (org.cloudfoundry.operations.applications.ApplicationEvent)1 Test (org.junit.Test)1 ClassPathResource (org.springframework.core.io.ClassPathResource)1