Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/dora/route_options_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ applications:
options:
loadbalancing: hash
hash_header: X-Hash-Header
hash_balance: 1.1
processes:
- type: web
instances: 2
Expand Down
6 changes: 6 additions & 0 deletions routing/per_route_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ var _ = RoutingDescribe("Per-Route Options", func() {
})
})
Context("when it's set to hash", func() {
It("is reachable", func() {
doraUrl := buildUrl(hashBasedRoutingHost)
curl := helpers.Curl(Config, fmt.Sprintf("%s/id", doraUrl), "-H", "X-Hash-Header: 1").Wait()
Expect(curl).To(Exit(0))
Expect(string(curl.Out.Contents())).To(MatchRegexp(appInstanceRegex.String()))
})
Context("when the requests contain the same hash header", func() {
It("routes requests to the same instance", func() {
doraUrl := buildUrl(hashBasedRoutingHost)
Expand Down