Skip to content
Snippets Groups Projects
ldap_test.go 22.7 KiB
Newer Older
  • Learn to ignore specific revisions
  • index default eq,sub
    # indices missing - uses default eq,sub
    index telephonenumber
    
    # other database parameters
    # read more in slapd.conf reference section
    cachesize 10000
    checkpoint 128 15
    `))
    
    
    func tlsAssets(t *testing.T, wd string) (certPath, keyPath string) {
    	certPath = filepath.Join(wd, "testdata", "server.crt")
    	keyPath = filepath.Join(wd, "testdata", "server.key")
    	for _, p := range []string{certPath, keyPath} {
    		if _, err := os.Stat(p); err != nil {
    			t.Fatalf("failed to find TLS asset file: %s %v", p, err)
    		}
    
    	return
    }
    
    func includes(t *testing.T, wd string) (paths []string) {
    
    	for _, f := range includeFiles {
    		p := filepath.Join(wd, "testdata", f)
    		if _, err := os.Stat(p); err != nil {
    			t.Fatalf("failed to find schema file: %s %v", p, err)
    		}
    		paths = append(paths, p)
    	}
    	return
    }