Files
1e3f40dc04 Added minimal-responses plugin (#4417)
* 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]>
2021-03-15 15:37:55 +01:00

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)
}
}