Skip to content

Commit

Permalink
Routes test should contain empty option
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariquest committed Dec 11, 2024
1 parent c6707fb commit f04a40c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cf/actors/routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ var _ = Describe("Routes", func() {
BeforeEach(func() {
expectedHostname = "hostname"
expectedPath = "path"
expectedOption = "loadbalancing:least-connection"
expectedOption = ""

expectedDomain = models.DomainFields{
Name: "foo.com",
Expand All @@ -102,6 +102,7 @@ var _ = Describe("Routes", func() {
Domain: expectedDomain,
Host: expectedHostname,
Path: expectedPath,
//Options: map[string]string{},
}
})

Expand Down Expand Up @@ -162,7 +163,7 @@ var _ = Describe("Routes", func() {
})

It("creates a route ", func() {
route, err := routeActor.FindOrCreateRoute(expectedHostname, expectedDomain, "", 1337, false, "loadbalancing:least-connection")
route, err := routeActor.FindOrCreateRoute(expectedHostname, expectedDomain, "", 1337, false, "")
Expect(route).To(Equal(expectedRoute))
Expect(err).ToNot(HaveOccurred())

Expand Down Expand Up @@ -719,7 +720,7 @@ var _ = Describe("Routes", func() {
var option string
BeforeEach(func() {
routeName = "hostname.old-domain.com/path"
option = "loadbalancing:least-connection"
option = ""
})

It("replace the domain from manifest", func() {
Expand All @@ -746,7 +747,7 @@ var _ = Describe("Routes", func() {
Domains: []string{"shared-domain.com"},
Hosts: []string{"hostname"},
}
option = "loadbalancing:least-connection"
option = ""
})

It("replace the domain from manifest", func() {
Expand Down Expand Up @@ -774,7 +775,7 @@ var _ = Describe("Routes", func() {
Domains: []string{"shared-domain.com"},
RoutePath: &path,
}
option = "loadbalancing:least-connection"
option = ""
})

It("replace the domain and path from manifest", func() {
Expand Down Expand Up @@ -810,7 +811,7 @@ var _ = Describe("Routes", func() {
appParamsFromContext = models.AppParams{
Domains: []string{"private-domain.com"},
}
option = "loadbalancing:least-connection"
option = ""
})

It("replace the domain from manifest", func() {
Expand Down Expand Up @@ -861,7 +862,7 @@ var _ = Describe("Routes", func() {
Context("the route does not have a hostname", func() {
BeforeEach(func() {
routeName = "domain.com/path"
option = "loadbalancing:least-connection"
option = ""
})
It("should append a random name ", func() {
Expect(findAndBindRouteErr).NotTo(HaveOccurred())
Expand Down

0 comments on commit f04a40c

Please sign in to comment.