@@ -25,21 +25,21 @@ var _ = Describe("Recursor", func() {
2525
2626 Context ("when dns config does not have any recursors configured" , func () {
2727 BeforeEach (func () {
28- resolvConfReader .GetReturns ([]string {"some-recursor-1:53" , "some-recursor-2:53" }, nil )
28+ resolvConfReader .GetReturns ([]string {"some-recursor-1:53" , "some-recursor-2:53" , "recursor-custom:1234" }, nil )
2929 })
3030
3131 It ("should generate recursors from the resolv.conf, shuffled" , func () {
3232 err := config .ConfigureRecursors (resolvConfReader , stringShuffler , & dnsConfig )
3333 Expect (err ).ToNot (HaveOccurred ())
34- Expect (dnsConfig .Recursors ).Should (Equal ([]string {"some-recursor-1:53" , "some-recursor-2:53" }))
34+ Expect (dnsConfig .Recursors ).Should (Equal ([]string {"some-recursor-1:53" , "some-recursor-2:53" , "recursor-custom:1234" }))
3535 Expect (stringShuffler .ShuffleCallCount ()).To (Equal (1 ))
3636
3737 Expect (resolvConfReader .GetCallCount ()).To (Equal (1 ))
3838 })
3939
4040 Context ("when unable to Get fails on RecursorReader" , func () {
4141 BeforeEach (func () {
42- resolvConfReader .GetReturns ([]string {"some-recursor-1" }, errors .New ("some-error" ))
42+ resolvConfReader .GetReturns ([]string {"some-recursor-1:53 " }, errors .New ("some-error" ))
4343 })
4444
4545 It ("should return the error" , func () {
@@ -52,7 +52,7 @@ var _ = Describe("Recursor", func() {
5252
5353 Context ("when excluding recursors" , func () {
5454 BeforeEach (func () {
55- dnsConfig .ExcludedRecursors = []string {"some-recursor-1" }
55+ dnsConfig .ExcludedRecursors = []string {"some-recursor-1:53" , "recursor-custom:1234 " }
5656 })
5757
5858 It ("should exclude the recursor" , func () {
@@ -67,27 +67,27 @@ var _ = Describe("Recursor", func() {
6767 Context ("when dns config does has recursors configured" , func () {
6868 BeforeEach (func () {
6969 dnsConfig = config.Config {
70- Recursors : []string {"some-recursor-1" , "some-recursor-2" },
70+ Recursors : []string {"some-recursor-1:53 " , "some-recursor-2:53" , "recursor-custom:1234 " },
7171 }
7272 })
7373
7474 It ("should shuffle the recursors" , func () {
7575 err := config .ConfigureRecursors (resolvConfReader , stringShuffler , & dnsConfig )
7676 Expect (err ).ToNot (HaveOccurred ())
7777 Expect (stringShuffler .ShuffleCallCount ()).To (Equal (1 ))
78- Expect (dnsConfig .Recursors ).Should (Equal ([]string {"some-recursor-1" , "some-recursor-2" }))
78+ Expect (dnsConfig .Recursors ).Should (Equal ([]string {"some-recursor-1:53 " , "some-recursor-2:53" , "recursor-custom:1234 " }))
7979 })
8080
8181 Context ("when excluding recursors" , func () {
8282 BeforeEach (func () {
83- dnsConfig .ExcludedRecursors = []string {"some-recursor-1" }
83+ dnsConfig .ExcludedRecursors = []string {"some-recursor-1:53" , "recursor-custom:1234 " }
8484 })
8585
8686 It ("should exclude the recursor" , func () {
8787 err := config .ConfigureRecursors (resolvConfReader , stringShuffler , & dnsConfig )
8888 Expect (err ).ToNot (HaveOccurred ())
8989 Expect (stringShuffler .ShuffleCallCount ()).To (Equal (1 ))
90- Expect (dnsConfig .Recursors ).Should (Equal ([]string {"some-recursor-2" }))
90+ Expect (dnsConfig .Recursors ).Should (Equal ([]string {"some-recursor-2:53 " }))
9191 })
9292 })
9393 })
0 commit comments