@@ -107,7 +107,7 @@ public void listApplicationRoutesByDomain() {
107107 .flatMap (function ((domainId , spaceId ) -> Mono .zip (
108108 createApplicationId (this .cloudFoundryClient , applicationName , spaceId ),
109109 Mono .just (domainId ),
110- createRouteId (this .cloudFoundryClient , domainId , "listByDomain " , spaceId )
110+ createRouteId (this .cloudFoundryClient , domainId , "listApplicationRoutesByDomain " , spaceId )
111111 )))
112112 .delayUntil (function ((applicationId , domainId , routeId ) -> requestReplaceDestinations (this .cloudFoundryClient , applicationId , routeId )))
113113 .flatMapMany (function ((applicationId , domainId , ignore ) -> PaginationUtils .requestClientV3Resources (page ->
@@ -120,7 +120,7 @@ public void listApplicationRoutesByDomain() {
120120 .map (RouteResource ::getMetadata )
121121 .map (Metadata ::getLabels )
122122 .as (StepVerifier ::create )
123- .expectNext (Collections .singletonMap ("test-listByDomain -key" , "test-listByDomain -value" ))
123+ .expectNext (Collections .singletonMap ("test-listApplicationRoutesByDomain -key" , "test-listApplicationRoutesByDomain -value" ))
124124 .expectComplete ()
125125 .verify (Duration .ofMinutes (5 ));
126126 }
@@ -139,7 +139,7 @@ public void listApplicationRoutesByHost() {
139139 ))
140140 .flatMap (function ((domainId , spaceId ) -> Mono .zip (
141141 createApplicationId (this .cloudFoundryClient , applicationName , spaceId ),
142- createRouteId (this .cloudFoundryClient , domainId , hostName , "listByHost " , null , null , spaceId )
142+ createRouteId (this .cloudFoundryClient , domainId , hostName , "listApplicationRoutesByHost " , null , null , spaceId )
143143 )))
144144 .flatMap (function ((applicationId , routeId ) -> requestReplaceDestinations (this .cloudFoundryClient , applicationId , routeId )
145145 .thenReturn (applicationId )))
@@ -150,11 +150,11 @@ public void listApplicationRoutesByHost() {
150150 .host (hostName )
151151 .page (page )
152152 .build ())))
153- .filter (route -> route .getMetadata ().getLabels ().containsKey ("test-listByHost -key" ))
153+ .filter (route -> route .getMetadata ().getLabels ().containsKey ("test-listApplicationRoutesByHost -key" ))
154154 .map (RouteResource ::getMetadata )
155155 .map (Metadata ::getLabels )
156156 .as (StepVerifier ::create )
157- .expectNext (Collections .singletonMap ("test-listByHost -key" , "test-listByHost -value" ))
157+ .expectNext (Collections .singletonMap ("test-listApplicationRoutesByHost -key" , "test-listApplicationRoutesByHost -value" ))
158158 .expectComplete ()
159159 .verify (Duration .ofMinutes (5 ));
160160 }
@@ -164,29 +164,30 @@ public void listApplicationRoutesByHost() {
164164 public void listApplicationRoutesByLabelSelector () {
165165 String applicationName = this .nameFactory .getApplicationName ();
166166 String domainName = this .nameFactory .getDomainName ();
167+ String spaceName = this .nameFactory .getSpaceName ();
167168
168169 this .organizationId
169170 .flatMap (organizationId -> Mono .zip (
170171 createDomainId (this .cloudFoundryClient , domainName , organizationId ),
171- this .spaceId
172+ createSpaceId ( this .cloudFoundryClient , organizationId , spaceName )
172173 ))
173174 .flatMap (function ((domainId , spaceId ) -> Mono .zip (
174175 createApplicationId (this .cloudFoundryClient , applicationName , spaceId ),
175- createRouteId (this .cloudFoundryClient , domainId , "listByLabelSelector " , spaceId )
176+ createRouteId (this .cloudFoundryClient , domainId , "listApplicationRoutesByLabelSelector " , spaceId )
176177 )))
177178 .flatMapMany (function ((applicationId , routeId ) -> requestReplaceDestinations (this .cloudFoundryClient , applicationId , routeId )
178179 .thenReturn (applicationId )))
179180 .flatMap (applicationId -> PaginationUtils .requestClientV3Resources (page ->
180181 this .cloudFoundryClient .applicationsV3 ()
181182 .listRoutes (ListApplicationRoutesRequest .builder ()
182183 .applicationId (applicationId )
183- .labelSelector ("test-listByLabelSelector -key=test-listByLabelSelector -value" )
184+ .labelSelector ("test-listApplicationRoutesByLabelSelector -key=test-listApplicationRoutesByLabelSelector -value" )
184185 .page (page )
185186 .build ())))
186187 .map (RouteResource ::getMetadata )
187188 .map (Metadata ::getLabels )
188189 .as (StepVerifier ::create )
189- .expectNext (Collections .singletonMap ("test-listByLabelSelector -key" , "test-listByLabelSelector -value" ))
190+ .expectNext (Collections .singletonMap ("test-listApplicationRoutesByLabelSelector -key" , "test-listApplicationRoutesByLabelSelector -value" ))
190191 .expectComplete ()
191192 .verify (Duration .ofMinutes (5 ));
192193 }
@@ -209,7 +210,7 @@ public void listApplicationRoutesByOrganizationId() {
209210 .flatMap (function ((domainId , organizationId , spaceId ) -> Mono .zip (
210211 createApplicationId (this .cloudFoundryClient , applicationName , spaceId ),
211212 Mono .just (organizationId ),
212- createRouteId (this .cloudFoundryClient , domainId , "listByOrganizationId " , spaceId )
213+ createRouteId (this .cloudFoundryClient , domainId , "listApplicationRoutesByOrganizationId " , spaceId )
213214 )))
214215 .delayUntil (function ((applicationId , organizationId , routeId ) -> requestReplaceDestinations (this .cloudFoundryClient , applicationId , routeId )))
215216 .flatMapMany (function ((applicationId , organizationId , ignore ) -> PaginationUtils .requestClientV3Resources (page ->
@@ -222,7 +223,7 @@ public void listApplicationRoutesByOrganizationId() {
222223 .map (RouteResource ::getMetadata )
223224 .map (Metadata ::getLabels )
224225 .as (StepVerifier ::create )
225- .expectNext (Collections .singletonMap ("test-listByOrganizationId -key" , "test-listByOrganizationId -value" ))
226+ .expectNext (Collections .singletonMap ("test-listApplicationRoutesByOrganizationId -key" , "test-listApplicationRoutesByOrganizationId -value" ))
226227 .expectComplete ()
227228 .verify (Duration .ofMinutes (5 ));
228229 }
@@ -242,7 +243,7 @@ public void listApplicationRoutesByPath() {
242243
243244 .flatMap (function ((domainId , spaceId ) -> Mono .zip (
244245 createApplicationId (this .cloudFoundryClient , applicationName , spaceId ),
245- createRouteId (this .cloudFoundryClient , domainId , null , "listByPath " , path , null , spaceId )
246+ createRouteId (this .cloudFoundryClient , domainId , null , "listApplicationRoutesByPath " , path , null , spaceId )
246247 )))
247248 .flatMapMany (function ((applicationId , routeId ) -> requestReplaceDestinations (this .cloudFoundryClient , applicationId , routeId )
248249 .thenReturn (applicationId )))
@@ -253,11 +254,11 @@ public void listApplicationRoutesByPath() {
253254 .path (path )
254255 .page (page )
255256 .build ())))
256- .filter (route -> route .getMetadata ().getLabels ().containsKey ("test-listByPath -key" ))
257+ .filter (route -> route .getMetadata ().getLabels ().containsKey ("test-listApplicationRoutesByPath -key" ))
257258 .map (RouteResource ::getMetadata )
258259 .map (Metadata ::getLabels )
259260 .as (StepVerifier ::create )
260- .expectNext (Collections .singletonMap ("test-listByPath -key" , "test-listByPath -value" ))
261+ .expectNext (Collections .singletonMap ("test-listApplicationRoutesByPath -key" , "test-listApplicationRoutesByPath -value" ))
261262 .expectComplete ()
262263 .verify (Duration .ofMinutes (5 ));
263264 }
@@ -278,7 +279,7 @@ public void listApplicationRoutesByPort() {
278279
279280 .flatMap (function ((domainId , spaceId ) -> Mono .zip (
280281 createApplicationId (this .cloudFoundryClient , applicationName , spaceId ),
281- createRouteId (this .cloudFoundryClient , domainId , null , "listByPort " , null , port , spaceId )
282+ createRouteId (this .cloudFoundryClient , domainId , null , "listApplicationRoutesByPort " , null , port , spaceId )
282283 )))
283284 .flatMapMany (function ((applicationId , routeId ) -> requestReplaceDestinations (this .cloudFoundryClient , applicationId , routeId )
284285 .thenReturn (applicationId )))
@@ -289,11 +290,11 @@ public void listApplicationRoutesByPort() {
289290 .port (port )
290291 .page (page )
291292 .build ())))
292- .filter (route -> route .getMetadata ().getLabels ().containsKey ("test-listByPort -key" ))
293+ .filter (route -> route .getMetadata ().getLabels ().containsKey ("test-listApplicationRoutesByPort -key" ))
293294 .map (RouteResource ::getMetadata )
294295 .map (Metadata ::getLabels )
295296 .as (StepVerifier ::create )
296- .expectNext (Collections .singletonMap ("test-listByPort -key" , "test-listByPort -value" ))
297+ .expectNext (Collections .singletonMap ("test-listApplicationRoutesByPort -key" , "test-listApplicationRoutesByPort -value" ))
297298 .expectComplete ()
298299 .verify (Duration .ofMinutes (5 ));
299300 }
@@ -303,16 +304,17 @@ public void listApplicationRoutesByPort() {
303304 public void listApplicationRoutesBySpaceId () {
304305 String applicationName = this .nameFactory .getApplicationName ();
305306 String domainName = this .nameFactory .getDomainName ();
307+ String spaceName = this .nameFactory .getSpaceName ();
306308
307309 this .organizationId
308310 .flatMap (organizationId -> Mono .zip (
309311 createDomainId (this .cloudFoundryClient , domainName , organizationId ),
310- this .spaceId
312+ createSpaceId ( this .cloudFoundryClient , organizationId , spaceName )
311313 ))
312314
313315 .flatMap (function ((domainId , spaceId ) -> Mono .zip (
314316 createApplicationId (this .cloudFoundryClient , applicationName , spaceId ),
315- createRouteId (this .cloudFoundryClient , domainId , "listBySpaceId " , spaceId ),
317+ createRouteId (this .cloudFoundryClient , domainId , "listApplicationRoutesBySpaceId " , spaceId ),
316318 Mono .just (spaceId )
317319 )))
318320 .delayUntil (function ((applicationId , routeId , spaceId ) -> requestReplaceDestinations (this .cloudFoundryClient , applicationId , routeId )
@@ -324,11 +326,11 @@ public void listApplicationRoutesBySpaceId() {
324326 .page (page )
325327 .spaceId (spaceId )
326328 .build ()))))
327- .filter (route -> route .getMetadata ().getLabels ().containsKey ("test-listBySpaceId -key" ))
329+ .filter (route -> route .getMetadata ().getLabels ().containsKey ("test-listApplicationRoutesBySpaceId -key" ))
328330 .map (RouteResource ::getMetadata )
329331 .map (Metadata ::getLabels )
330332 .as (StepVerifier ::create )
331- .expectNext (Collections .singletonMap ("test-listBySpaceId -key" , "test-listBySpaceId -value" ))
333+ .expectNext (Collections .singletonMap ("test-listApplicationRoutesBySpaceId -key" , "test-listApplicationRoutesBySpaceId -value" ))
332334 .expectComplete ()
333335 .verify (Duration .ofMinutes (5 ));
334336 }
0 commit comments