mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-04 03:27:23 -05:00 
			
		
		
		
	To use a plugged in storage, specify "storage storage_name" in the tls block of the Caddyfile, by default, file storage will be used
		
			
				
	
	
		
			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 := 26 // 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)
 | 
						|
	}
 | 
						|
}
 |