mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-26 02:09:47 +08:00
cdf7cf5c3f
* WIP * HTTP2/Push for golang 1.8 * Push plugin completed for review * Correct build tag * Move push plugin position * Add build tags to tests * Gofmt that code * Add header/method validations * Load push plugin * Fixes for wrapping writers * Push after delivering file * Fixes, review changes * Remove build tags, support new syntax * Fix spelling * gofmt -s -w . * Gogland time * Add interface guards * gofmt * After review fixes
20 lines
562 B
Go
20 lines
562 B
Go
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) {
|
|
numStandardPlugins := 30 // importing caddyhttp plugs in this many plugins
|
|
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)
|
|
}
|
|
}
|