|
20 | 20 | import static org.cloudfoundry.client.v3.LifecycleType.BUILDPACK;
|
21 | 21 | import static org.cloudfoundry.client.v3.LifecycleType.DOCKER;
|
22 | 22 | import static org.cloudfoundry.operations.TestObjects.fill;
|
| 23 | +import static org.mockito.ArgumentMatchers.any; |
23 | 24 | import static org.mockito.Mockito.RETURNS_SMART_NULLS;
|
24 | 25 | import static org.mockito.Mockito.mock;
|
25 | 26 | import static org.mockito.Mockito.when;
|
@@ -1326,7 +1327,7 @@ void logs() {
|
1326 | 1327 | this.applications
|
1327 | 1328 | .logs(ReadRequest.builder().sourceId("test-application-name").build())
|
1328 | 1329 | .as(StepVerifier::create)
|
1329 |
| - .expectNext(fill(Log.builder(), "log-message-").build()) |
| 1330 | + .expectNextMatches(log -> log.getPayload().equals("test-payload")) |
1330 | 1331 | .expectComplete()
|
1331 | 1332 | .verify(Duration.ofSeconds(5));
|
1332 | 1333 | }
|
@@ -5258,16 +5259,16 @@ private static void requestListTasksEmpty(
|
5258 | 5259 |
|
5259 | 5260 | private static void requestLogsRecentLogCache(LogCacheClient logCacheClient, String applicationId) {
|
5260 | 5261 | when(logCacheClient.recentLogs(
|
5261 |
| - ReadRequest.builder().sourceId(applicationId).build())) |
| 5262 | + any())) |
5262 | 5263 | .thenReturn(
|
5263 | 5264 | Mono.just(fill(ReadResponse.builder())
|
5264 |
| - .envelopes(fill(EnvelopeBatch.builder()) |
5265 |
| - .batch(fill(org.cloudfoundry.logcache.v1.Envelope.builder()) |
5266 |
| - .log(fill(Log.builder()) |
5267 |
| - .payload("test-payload") |
5268 |
| - .type(LogType.OUT).build()) |
5269 |
| - .build()) |
5270 |
| - .build()) |
| 5265 | + .envelopes(fill(EnvelopeBatch.builder()) |
| 5266 | + .batch(fill(org.cloudfoundry.logcache.v1.Envelope.builder()) |
| 5267 | + .log(fill(Log.builder()) |
| 5268 | + .payload("test-payload") |
| 5269 | + .type(LogType.OUT).build()) |
| 5270 | + .build()) |
| 5271 | + .build()) |
5271 | 5272 | .build()));
|
5272 | 5273 | }
|
5273 | 5274 |
|
|
0 commit comments