File: multi_user_test.go

package info (click to toggle)
golang-github-protonmail-gluon 0.17.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,020 kB
  • sloc: sh: 55; makefile: 5
file content (18 lines) | stat: -rw-r--r-- 492 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package tests

import (
	"testing"
)

func TestMultiUser(t *testing.T) {
	runTest(t, defaultServerOptions(t, withCredentials([]credentials{
		{usernames: []string{"user1"}, password: "pass"},
		{usernames: []string{"user2"}, password: "pass"},
	})), []int{1, 2}, func(c map[int]*testConnection, s *testSession) {
		c[1].C(`A001 login user1 pass`).OK(`A001`)
		c[2].C(`B001 login user2 pass`).OK(`B001`)

		c[1].C(`A002 select inbox`).OK(`A002`)
		c[2].C(`B002 select inbox`).OK(`B002`)
	})
}