Commit 90d575cb authored by ale's avatar ale

Move LDAP code to the backend/ldap subdirectory

parent 26bddda8
package backend
package ldapbackend
import (
"encoding/base64"
......
package backend
package ldapbackend
import (
"context"
......
package backend
package ldapbackend
import (
"context"
......@@ -36,7 +36,7 @@ func startServerAndGetUser3(t testing.TB) (func(), as.Backend, *as.RawUser) {
func startServer(t testing.TB) (func(), as.Backend) {
stop := ldaptest.StartServer(t, &ldaptest.Config{
Dir: "../ldaptest",
Dir: "../../ldaptest",
Port: testLDAPPort,
Base: "dc=example,dc=com",
LDIFs: []string{
......@@ -182,7 +182,7 @@ func TestModel_SearchUser(t *testing.T) {
func TestModel_SetResourceStatus(t *testing.T) {
stop := ldaptest.StartServer(t, &ldaptest.Config{
Dir: "../ldaptest",
Dir: "../../ldaptest",
Port: testLDAPPort,
Base: "dc=example,dc=com",
LDIFs: []string{"testdata/base.ldif", "testdata/test1.ldif"},
......@@ -215,7 +215,7 @@ func TestModel_SetResourceStatus(t *testing.T) {
func TestModel_HasAnyResource(t *testing.T) {
stop := ldaptest.StartServer(t, &ldaptest.Config{
Dir: "../ldaptest",
Dir: "../../ldaptest",
Port: testLDAPPort,
Base: "dc=example,dc=com",
LDIFs: []string{"testdata/base.ldif", "testdata/test1.ldif"},
......
package backend
package ldapbackend
import (
"errors"
......
package backend
package ldapbackend
import (
"testing"
......
package backend
package ldapbackend
import (
"context"
......
package backend
package ldapbackend
import (
"os"
......
......@@ -13,7 +13,7 @@ import (
"git.autistici.org/ai3/go-common/serverutil"
"gopkg.in/yaml.v2"
"git.autistici.org/ai3/accountserver/backend"
ldapbackend "git.autistici.org/ai3/accountserver/backend/ldap"
"git.autistici.org/ai3/accountserver/server"
)
......@@ -149,7 +149,7 @@ func main() {
log.Fatal(err)
}
be, err := backend.NewLDAPBackend(
be, err := ldapbackend.NewLDAPBackend(
config.LDAP.URI,
config.LDAP.BindDN,
bindPw,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment