mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 19:42:20 +00:00
Do not test bypass auth backend
This commit is contained in:
parent
45c6b5dba5
commit
2bc62bb6e8
@ -1,24 +1,28 @@
|
|||||||
package auth
|
package auth
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
"gitlab.crans.org/nounous/ghostream/auth/basic"
|
"gitlab.crans.org/nounous/ghostream/auth/basic"
|
||||||
"gitlab.crans.org/nounous/ghostream/auth/ldap"
|
"gitlab.crans.org/nounous/ghostream/auth/ldap"
|
||||||
"testing"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestLoadConfiguration(t *testing.T) {
|
func TestLoadConfiguration(t *testing.T) {
|
||||||
_, err := New(&Options{Backend: "bypass"})
|
_, err := New(&Options{
|
||||||
if err != nil {
|
Enabled: true,
|
||||||
t.Error("Creating bypass authentication backend failed:", err)
|
Backend: "basic",
|
||||||
}
|
Basic: basic.Options{Credentials: make(map[string]string)},
|
||||||
|
})
|
||||||
_, err = New(&Options{Backend: "basic", Basic: basic.Options{Credentials: make(map[string]string)}})
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error("Creating basic authentication backend failed:", err)
|
t.Error("Creating basic authentication backend failed:", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = New(&Options{Backend: "ldap", LDAP: ldap.Options{URI: "ldap://127.0.0.1:389", UserDn: "cn=users,dc=example,dc=com"}})
|
_, err = New(&Options{
|
||||||
|
Enabled: true,
|
||||||
|
Backend: "ldap",
|
||||||
|
LDAP: ldap.Options{URI: "ldap://127.0.0.1:389", UserDn: "cn=users,dc=example,dc=com"},
|
||||||
|
})
|
||||||
|
|
||||||
// TODO Maybe start a LDAP server?
|
// TODO Maybe start a LDAP server?
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user