(username string)
| 514 | } |
| 515 | |
| 516 | func (a *authUserStorage) AddUser(username string) AuthUser { |
| 517 | a.lock.Lock() |
| 518 | defer a.lock.Unlock() |
| 519 | if _, ok := a.users[username]; ok { |
| 520 | panic(message.NewMessage(message.MTest, "User %s already exists in test user database.", username)) |
| 521 | } |
| 522 | a.users[username] = &authUser{ |
| 523 | lock: &sync.Mutex{}, |
| 524 | } |
| 525 | return a.users[username] |
| 526 | } |
| 527 | |
| 528 | func (a *authUserStorage) GetUser(username string) (AuthUser, error) { |
| 529 | a.lock.Lock() |
nothing calls this directly
no test coverage detected