mirror of
https://github.com/coredns/coredns.git
synced 2026-10-08 19:45:21 -04:00
core/dnsserver: support explicit registration for embedded hosts (#8525)
* core/dnsserver: test host-plugin embedding with forward Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com> * core/dnsserver: add a directive setter for embedded hosts Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com> * core/dnsserver: support explicit server registration for embedded hosts Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com> --------- Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
This commit is contained in:
@@ -7,11 +7,18 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"slices"
|
||||
"testing"
|
||||
|
||||
"github.com/coredns/caddy"
|
||||
)
|
||||
|
||||
func TestServerTypeRegistration(t *testing.T) {
|
||||
if !slices.Contains(caddy.ListPlugins()["server_types"], serverType) {
|
||||
t.Fatal("coremain must register the DNS server type in both build modes")
|
||||
}
|
||||
}
|
||||
|
||||
func TestConfLoader(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user