fixed problems where routes were not mathing

This commit is contained in:
TomPallister
2016-11-26 14:08:09 +00:00
parent 2103c60d4a
commit 536db48049
10 changed files with 128 additions and 20 deletions

View File

@ -59,7 +59,7 @@ namespace Ocelot.UnitTests.Configuration
.WithDownstreamTemplate("/products/{productId}")
.WithUpstreamTemplate("/api/products/{productId}")
.WithUpstreamHttpMethod("Get")
.WithUpstreamTemplatePattern("(?i)/api/products/.*$")
.WithUpstreamTemplatePattern("(?i)/api/products/.*/$")
.Build()
}))
.BDDfy();
@ -88,7 +88,7 @@ namespace Ocelot.UnitTests.Configuration
.WithDownstreamTemplate("/products/{productId}")
.WithUpstreamTemplate("/api/products/{productId}")
.WithUpstreamHttpMethod("Get")
.WithUpstreamTemplatePattern("(?i)/api/products/.*$")
.WithUpstreamTemplatePattern("(?i)/api/products/.*/$")
.Build()
}))
.BDDfy();
@ -118,7 +118,7 @@ namespace Ocelot.UnitTests.Configuration
.WithDownstreamTemplate("/products/{productId}")
.WithUpstreamTemplate("/api/products/{productId}")
.WithUpstreamHttpMethod("Get")
.WithUpstreamTemplatePattern("/api/products/.*$")
.WithUpstreamTemplatePattern("/api/products/.*/$")
.Build()
}))
.BDDfy();
@ -152,7 +152,7 @@ namespace Ocelot.UnitTests.Configuration
.WithDownstreamTemplate("/products/{productId}")
.WithUpstreamTemplate("/api/products/{productId}")
.WithUpstreamHttpMethod("Get")
.WithUpstreamTemplatePattern("/api/products/.*$")
.WithUpstreamTemplatePattern("/api/products/.*/$")
.WithRequestIdKey("blahhhh")
.Build()
}))
@ -183,7 +183,7 @@ namespace Ocelot.UnitTests.Configuration
.WithDownstreamTemplate("/products/{productId}")
.WithUpstreamTemplate("/api/products/{productId}")
.WithUpstreamHttpMethod("Get")
.WithUpstreamTemplatePattern("/api/products/.*$")
.WithUpstreamTemplatePattern("/api/products/.*/$")
.Build()
}))
.BDDfy();
@ -198,7 +198,7 @@ namespace Ocelot.UnitTests.Configuration
.WithDownstreamTemplate("/products/{productId}")
.WithUpstreamTemplate("/api/products/{productId}")
.WithUpstreamHttpMethod("Get")
.WithUpstreamTemplatePattern("/api/products/.*$")
.WithUpstreamTemplatePattern("/api/products/.*/$")
.WithAuthenticationProvider("IdentityServer")
.WithAuthenticationProviderUrl("http://localhost:51888")
.WithRequireHttps(false)
@ -261,7 +261,7 @@ namespace Ocelot.UnitTests.Configuration
.WithDownstreamTemplate("/products/{productId}")
.WithUpstreamTemplate("/api/products/{productId}")
.WithUpstreamHttpMethod("Get")
.WithUpstreamTemplatePattern("/api/products/.*$")
.WithUpstreamTemplatePattern("/api/products/.*/$")
.WithAuthenticationProvider("IdentityServer")
.WithAuthenticationProviderUrl("http://localhost:51888")
.WithRequireHttps(false)
@ -323,7 +323,7 @@ namespace Ocelot.UnitTests.Configuration
.WithDownstreamTemplate("/products/{productId}")
.WithUpstreamTemplate("/api/products/{productId}/variants/{variantId}")
.WithUpstreamHttpMethod("Get")
.WithUpstreamTemplatePattern("/api/products/.*/variants/.*$")
.WithUpstreamTemplatePattern("/api/products/.*/variants/.*/$")
.Build()
}))
.BDDfy();