Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
49971d9
New update route command and necessary api extension
Dariquest Dec 9, 2024
cc92b54
Add error message for wrong option format
Dariquest Dec 9, 2024
d9f01fb
Add error message for wrong option format
Dariquest Dec 9, 2024
60a8ba1
Add error message for wrong option format
Dariquest Dec 9, 2024
5a5586f
Refactoring
Dariquest Dec 9, 2024
2625676
Add help
Dariquest Dec 10, 2024
7a61d11
Extend routes output by options
Dariquest Dec 10, 2024
0904109
Extend create-route command by option setting capability
Dariquest Dec 10, 2024
7398e12
Extend route by options
Dariquest Dec 10, 2024
bab7e96
Unit tests
Dariquest Dec 10, 2024
f4e08b9
Merge branch 'main' into rfc0027perRouteFeat
Dariquest Dec 10, 2024
4f52ea8
Model adjustments
Dariquest Dec 11, 2024
41f1186
FakeRepo extensions
Dariquest Dec 11, 2024
5e50adc
Unit Tests
Dariquest Dec 11, 2024
3fb13ab
Fix Unit Tests
Dariquest Dec 11, 2024
5b3708b
Fix Unit Tests
Dariquest Dec 11, 2024
3f16654
Fix Unit Tests
Dariquest Dec 11, 2024
b4959f8
Fix Unit Tests
Dariquest Dec 11, 2024
e432091
Fix Unit Tests
Dariquest Dec 11, 2024
ddc1f4b
Fix Unit Tests
Dariquest Dec 11, 2024
253519c
Fix Unit Tests
Dariquest Dec 11, 2024
cace223
Add update-route to the command list
Dariquest Dec 11, 2024
e2837f1
Add update-route to the command list
Dariquest Dec 11, 2024
c6707fb
Change command metadata
Dariquest Dec 11, 2024
f04a40c
Routes test should contain empty option
Dariquest Dec 11, 2024
e4ed4f0
Rename update-route & add unit test
Dariquest Dec 13, 2024
b906688
Extend tests
Dariquest Dec 13, 2024
c55b7f7
Extend tests
Dariquest Dec 13, 2024
06418d4
Remove comment
Dariquest Dec 18, 2024
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
Prev Previous commit
Next Next commit
FakeRepo extensions
  • Loading branch information
Dariquest committed Dec 11, 2024
commit 41f11867341dec63dbafbfe8913e1b0fa8aa7d6c
8 changes: 4 additions & 4 deletions cf/api/apifakes/fake_route_repository.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions cf/commands/route/create_route_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,13 @@ var _ = Describe("CreateRoute", func() {
Expect(err).NotTo(HaveOccurred())

Expect(routeRepo.CreateInSpaceCallCount()).To(Equal(1))
hostname, path, domain, space, port, randomPort := routeRepo.CreateInSpaceArgsForCall(0)
hostname, path, domain, space, port, randomPort, option := routeRepo.CreateInSpaceArgsForCall(0)
Expect(hostname).To(Equal(""))
Expect(path).To(Equal(""))
Expect(domain).To(Equal("domain-guid"))
Expect(space).To(Equal("space-guid"))
Expect(port).To(Equal(0))
Expect(option).To(Equal("loadbalancing:round-robin"))
Expect(randomPort).To(BeFalse())
})

Expand All @@ -230,7 +231,7 @@ var _ = Describe("CreateRoute", func() {
Expect(err).NotTo(HaveOccurred())

Expect(routeRepo.CreateInSpaceCallCount()).To(Equal(1))
_, path, _, _, _, _ := routeRepo.CreateInSpaceArgsForCall(0)
_, path, _, _, _, _, _ := routeRepo.CreateInSpaceArgsForCall(0)
Expect(path).To(Equal("some-path"))
})
})
Expand All @@ -245,7 +246,7 @@ var _ = Describe("CreateRoute", func() {
Expect(err).NotTo(HaveOccurred())

Expect(routeRepo.CreateInSpaceCallCount()).To(Equal(1))
_, _, _, _, _, randomPort := routeRepo.CreateInSpaceArgsForCall(0)
_, _, _, _, _, randomPort, _ := routeRepo.CreateInSpaceArgsForCall(0)
Expect(randomPort).To(BeTrue())
})
})
Expand All @@ -260,7 +261,7 @@ var _ = Describe("CreateRoute", func() {
Expect(err).NotTo(HaveOccurred())

Expect(routeRepo.CreateInSpaceCallCount()).To(Equal(1))
_, _, _, _, port, _ := routeRepo.CreateInSpaceArgsForCall(0)
_, _, _, _, port, _, _ := routeRepo.CreateInSpaceArgsForCall(0)
Expect(port).To(Equal(9090))
})
})
Expand All @@ -275,7 +276,7 @@ var _ = Describe("CreateRoute", func() {
Expect(err).NotTo(HaveOccurred())

Expect(routeRepo.CreateInSpaceCallCount()).To(Equal(1))
host, _, _, _, _, _ := routeRepo.CreateInSpaceArgsForCall(0)
host, _, _, _, _, _, _ := routeRepo.CreateInSpaceArgsForCall(0)
Expect(host).To(Equal("host"))
})
})
Expand Down Expand Up @@ -372,12 +373,13 @@ var _ = Describe("CreateRoute", func() {
rc.CreateRoute("hostname", "path", 9090, true, domainFields, spaceFields, "loadbalancing=round-robin")

Expect(routeRepo.CreateInSpaceCallCount()).To(Equal(1))
hostname, path, domain, space, port, randomPort := routeRepo.CreateInSpaceArgsForCall(0)
hostname, path, domain, space, port, randomPort, option := routeRepo.CreateInSpaceArgsForCall(0)
Expect(hostname).To(Equal("hostname"))
Expect(path).To(Equal("path"))
Expect(domain).To(Equal(domainFields.GUID))
Expect(space).To(Equal(spaceFields.GUID))
Expect(port).To(Equal(9090))
Expect(option).To(Equal("loadbalancing:round-robin"))
Expect(randomPort).To(BeTrue())
})

Expand Down
Loading