mirror of
https://github.com/coredns/coredns.git
synced 2025-11-02 02:03:13 -05:00
Add weighted-round-robin policy to loadbalance plugin (#5662)
* Add weighted-round-robin policy to loadbalance plugin Signed-off-by: Gabor Dozsa <gabor.dozsa@ibm.com>
This commit is contained in:
@@ -11,8 +11,8 @@ import (
|
||||
"github.com/miekg/dns"
|
||||
)
|
||||
|
||||
func TestLoadBalance(t *testing.T) {
|
||||
rm := RoundRobin{Next: handler()}
|
||||
func TestLoadBalanceRandom(t *testing.T) {
|
||||
rm := LoadBalance{Next: handler(), shuffle: randomShuffle}
|
||||
|
||||
// the first X records must be cnames after this test
|
||||
tests := []struct {
|
||||
@@ -124,7 +124,7 @@ func TestLoadBalance(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadBalanceXFR(t *testing.T) {
|
||||
rm := RoundRobin{Next: handler()}
|
||||
rm := LoadBalance{Next: handler()}
|
||||
|
||||
answer := []dns.RR{
|
||||
test.SOA("skydns.test. 30 IN SOA ns.dns.skydns.test. hostmaster.skydns.test. 1542756695 7200 1800 86400 30"),
|
||||
|
||||
Reference in New Issue
Block a user