Add more tests (#1949)

* add more test code

* add more test code
This commit is contained in:
zryfish
2020-03-15 10:22:39 +08:00
committed by GitHub
parent f8e7d06b07
commit abf0d66b22
13 changed files with 444 additions and 55 deletions

View File

@@ -27,23 +27,6 @@ import (
"time"
)
type Interface interface {
// Create create a new user in ldap
Create(user *iam.User) error
// Update updates a user information, return error if user not exists
Update(user *iam.User) error
// Delete deletes a user from ldap, return nil if user not exists
Delete(name string) error
// Get gets a user by its username from ldap
Get(name string) (*iam.User, error)
//
Verify(name string, password string) error
}
const (
ldapAttributeObjectClass = "objectClass"
ldapAttributeCommonName = "cn"