Add least time load balancing strategy
This commit is contained in:
parent
067c7e7152
commit
a754236ce5
25 changed files with 1830 additions and 134 deletions
|
|
@ -82,6 +82,20 @@ func TestGetLoadBalancer(t *testing.T) {
|
|||
fwd: &forwarderMock{},
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
desc: "Fails when unsupported strategy is set",
|
||||
serviceName: "test",
|
||||
service: &dynamic.ServersLoadBalancer{
|
||||
Strategy: "invalid",
|
||||
Servers: []dynamic.Server{
|
||||
{
|
||||
URL: "http://localhost:8080",
|
||||
},
|
||||
},
|
||||
},
|
||||
fwd: &forwarderMock{},
|
||||
expectError: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range testCases {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue