|
29 | 29 | import org.cloudfoundry.CleanupCloudFoundryAfterClass; |
30 | 30 | import org.cloudfoundry.CloudFoundryVersion; |
31 | 31 | import org.cloudfoundry.IfCloudFoundryVersion; |
| 32 | +import org.cloudfoundry.client.CloudFoundryClient; |
32 | 33 | import org.cloudfoundry.logcache.v1.Envelope; |
33 | 34 | import org.cloudfoundry.logcache.v1.EnvelopeBatch; |
34 | 35 | import org.cloudfoundry.logcache.v1.EnvelopeType; |
@@ -108,6 +109,7 @@ public final class ApplicationsTest extends AbstractIntegrationTest { |
108 | 109 | @Autowired private String serviceName; |
109 | 110 |
|
110 | 111 | @Autowired private LogCacheClient logCacheClient; |
| 112 | + @Autowired private CloudFoundryClient cloudFoundryClient; |
111 | 113 |
|
112 | 114 | // To create a service in #pushBindService, the Service Broker must be installed first. |
113 | 115 | // We ensure it is by loading the serviceBrokerId @Lazy bean. |
@@ -821,7 +823,26 @@ public void pushManifestV3WithMetadata() throws IOException { |
821 | 823 | this.cloudFoundryOperations |
822 | 824 | .applications() |
823 | 825 | .pushManifestV3(PushManifestV3Request.builder().manifest(manifest).build()) |
| 826 | + .then( |
| 827 | + this.cloudFoundryOperations |
| 828 | + .applications() |
| 829 | + .get(GetApplicationRequest.builder().name(applicationName).build())) |
| 830 | + .map(ApplicationDetail::getId) |
| 831 | + .flatMap( |
| 832 | + id -> |
| 833 | + this.cloudFoundryClient |
| 834 | + .applicationsV3() |
| 835 | + .get( |
| 836 | + org.cloudfoundry.client.v3.applications |
| 837 | + .GetApplicationRequest.builder() |
| 838 | + .applicationId(id) |
| 839 | + .build())) |
824 | 840 | .as(StepVerifier::create) |
| 841 | + .expectNextMatches( |
| 842 | + createdApp -> |
| 843 | + labels.equals(createdApp.getMetadata().getLabels()) |
| 844 | + && annotations.equals( |
| 845 | + createdApp.getMetadata().getAnnotations())) |
825 | 846 | .expectComplete() |
826 | 847 | .verify(Duration.ofMinutes(5)); |
827 | 848 | } |
|
0 commit comments