plugin/forward: Enable multiple forward declarations (#5127)

* enable multiple declarations of forward plugin

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver
2022-07-20 10:35:04 -04:00
committed by GitHub
parent 11059dd855
commit 513f27b9a9
5 changed files with 175 additions and 72 deletions

View File

@@ -23,7 +23,8 @@ func TestProxy(t *testing.T) {
defer s.Close()
c := caddy.NewTestController("dns", "forward . "+s.Addr)
f, err := parseForward(c)
fs, err := parseForward(c)
f := fs[0]
if err != nil {
t.Errorf("Failed to create forwarder: %s", err)
}
@@ -53,7 +54,8 @@ func TestProxyTLSFail(t *testing.T) {
defer s.Close()
c := caddy.NewTestController("dns", "forward . tls://"+s.Addr)
f, err := parseForward(c)
fs, err := parseForward(c)
f := fs[0]
if err != nil {
t.Errorf("Failed to create forwarder: %s", err)
}