@@ -235,7 +235,7 @@ public void getTcp() throws TimeoutException, InterruptedException, IOException
235235 .get (GetApplicationRequest .builder ()
236236 .name (applicationName )
237237 .build ()))
238- .map (applicationDetail -> applicationDetail .getUrls ().get (0 ))
238+ .map (applicationDetail -> applicationDetail .getUrls ().get (0 ))
239239 .as (StepVerifier ::create )
240240 .consumeNextWith (route -> assertThat (route ).matches (domainName + "+?:\\ d+$" ))
241241 .expectComplete ()
@@ -626,6 +626,59 @@ public void pushUpdateRoute() throws TimeoutException, InterruptedException, IOE
626626 .verify (Duration .ofMinutes (5 ));
627627 }
628628
629+ @ Test
630+ public void pushUpdateTcpRoute () throws TimeoutException , InterruptedException , IOException {
631+ String applicationName = this .nameFactory .getApplicationName ();
632+ String domainName = this .nameFactory .getDomainName ();
633+
634+ requestCreateTcpDomain (this .cloudFoundryOperations , domainName , DEFAULT_ROUTER_GROUP )
635+ .then (this .cloudFoundryOperations .applications ()
636+ .pushManifest (PushApplicationManifestRequest .builder ()
637+ .manifest (ApplicationManifest .builder ()
638+ .path (new ClassPathResource ("test-application.zip" ).getFile ().toPath ())
639+ .buildpack ("staticfile_buildpack" )
640+ .disk (512 )
641+ .healthCheckType (ApplicationHealthCheck .PROCESS )
642+ .memory (64 )
643+ .name (applicationName )
644+ .randomRoute (true )
645+ .route (Route .builder ()
646+ .route (domainName )
647+ .build ())
648+ .build ())
649+ .noStart (true )
650+ .build ()))
651+ .then (this .cloudFoundryOperations .applications ()
652+ .pushManifest (PushApplicationManifestRequest .builder ()
653+ .manifest (ApplicationManifest .builder ()
654+ .path (new ClassPathResource ("test-application.zip" ).getFile ().toPath ())
655+ .buildpack ("staticfile_buildpack" )
656+ .disk (512 )
657+ .healthCheckType (ApplicationHealthCheck .PROCESS )
658+ .memory (64 )
659+ .name (applicationName )
660+ .randomRoute (true )
661+ .route (Route .builder ()
662+ .route (domainName )
663+ .build ())
664+ .build ())
665+ .noStart (true )
666+ .build ()))
667+ .then (this .cloudFoundryOperations .applications ()
668+ .get (GetApplicationRequest .builder ()
669+ .name (applicationName )
670+ .build ()))
671+ .map (ApplicationDetail ::getUrls )
672+ .as (StepVerifier ::create )
673+ .consumeNextWith (routes -> {
674+ assertThat (routes .get (0 ).matches (domainName + "+?:\\ d+$" ));
675+ assertThat (routes .get (1 ).matches (domainName + "+?:\\ d+$" ));
676+ assertThat (!routes .get (0 ).matches (routes .get (1 )));
677+ })
678+ .expectComplete ()
679+ .verify (Duration .ofMinutes (5 ));
680+ }
681+
629682 @ Test
630683 public void pushWithHost () throws TimeoutException , InterruptedException , IOException {
631684 String applicationName = this .nameFactory .getApplicationName ();
0 commit comments