mirror of
https://github.com/hanzoai/dns.git
synced 2026-10-30 18:40:55 +00:00
* Added minimal-responses plugin Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * Removed unnecessary comments * Updated tests Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * Reformated imports Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * Updated package name Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * Removed unnecessary comments Co-authored-by: Miek Gieben <[email protected]> * Added changes Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * updated Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * Updated comment for NextOrFailure Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * Updated to test.Case for testing Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * Formated imports using goimports Signed-off-by: Soumya Ghosh Dastidar <[email protected]> Co-authored-by: Miek Gieben <[email protected]>
20 lines
401 B
Go
20 lines
401 B
Go
package minimal
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/coredns/caddy"
|
|
)
|
|
|
|
func TestSetup(t *testing.T) {
|
|
c := caddy.NewTestController("dns", `minimal-response`)
|
|
if err := setup(c); err != nil {
|
|
t.Fatalf("Expected no errors, but got: %v", err)
|
|
}
|
|
|
|
c = caddy.NewTestController("dns", `minimal-response example.org`)
|
|
if err := setup(c); err == nil {
|
|
t.Fatalf("Expected errors, but got: %v", err)
|
|
}
|
|
}
|