mirror of
https://github.com/coredns/coredns.git
synced 2025-12-20 09:05:14 -05:00
mw/autopath: integration test with erratic (#930)
Add integration test with erratic. For this erratic now also returns an autopath searchpath. This tests the whole chain; i.e registring a searchfunction and calling that from autopath. This tests does a autopathing domain and a non-autopathing one.
This commit is contained in:
8
middleware/erratic/autopath.go
Normal file
8
middleware/erratic/autopath.go
Normal file
@@ -0,0 +1,8 @@
|
||||
package erratic
|
||||
|
||||
import "github.com/coredns/coredns/request"
|
||||
|
||||
// AutoPath implements the AutoPathFunc call from the autopath middleware.
|
||||
func (e *Erratic) AutoPath(state request.Request) []string {
|
||||
return []string{"a.example.org.", "b.example.org.", ""}
|
||||
}
|
||||
Reference in New Issue
Block a user