Skip to content

Commit 316dba6

Browse files
committed
Updates test so version is in the same path segment
1 parent 31b149d commit 316dba6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-cloud-gateway-server-webflux/src/test/java/org/springframework/cloud/gateway/handler/predicate/VersionRoutePredicateFactoryPathSegmentIntegrationTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void versionPathSegmentWorks() {
4040
testClient.mutate()
4141
.build()
4242
.get()
43-
.uri("/version14/1.4.0")
43+
.uri("/version14/sub/1.4.0")
4444
.exchange()
4545
.expectStatus()
4646
.isOk()
@@ -60,10 +60,10 @@ public static class TestConfig {
6060
public RouteLocator testRouteLocator(RouteLocatorBuilder builder) {
6161
return builder.routes()
6262
.route("version14_dsl",
63-
r -> r.path("/version14/{pathVersion}")
63+
r -> r.path("/version14/sub/{pathVersion}")
6464
.and()
6565
.version("1.4")
66-
.filters(f -> f.setPath("/httpbin/anything/version14{pathVersion}")
66+
.filters(f -> f.setPath("/httpbin/anything/{pathVersion}")
6767
.setResponseHeader("X-Matched-Version", "1.4"))
6868
.uri(uri))
6969
.build();

spring-cloud-gateway-server-webflux/src/test/resources/application-versionspathsegment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ spring:
22
webflux:
33
apiversion:
44
use:
5-
path-segment: 1
5+
path-segment: 2
66
logging:
77
level:
88
org.springframework.cloud.gateway: TRACE

0 commit comments

Comments
 (0)