2016-06-21 01:11:55 -05:00
|
|
|
package caddyhttp
|
|
|
|
|
|
|
|
import (
|
|
|
|
"strings"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/mholt/caddy"
|
|
|
|
)
|
|
|
|
|
|
|
|
// TODO: this test could be improved; the purpose is to
|
|
|
|
// ensure that the standard plugins are in fact plugged in
|
|
|
|
// and registered properly; this is a quick/naive way to do it.
|
|
|
|
func TestStandardPlugins(t *testing.T) {
|
2016-08-29 09:14:06 -05:00
|
|
|
numStandardPlugins := 27 // importing caddyhttp plugs in this many plugins
|
2016-06-21 01:11:55 -05:00
|
|
|
s := caddy.DescribePlugins()
|
|
|
|
if got, want := strings.Count(s, "\n"), numStandardPlugins+5; got != want {
|
|
|
|
t.Errorf("Expected all standard plugins to be plugged in, got:\n%s", s)
|
|
|
|
}
|
|
|
|
}
|