Exemplo n.º 1
0
func (s *AdminSuite) SetUpTest(c *gc.C) {
	d, err := t.NewDB(
		t.SetupBolt("test.db"),
		t.SetupBuckets(admin.Buckets()),
	)
	c.Assert(err, jc.ErrorIsNil)
	s.d = d

	s.admins = map[string]t.TestAdmin{
		"bob": {
			Email:  "*****@*****.**",
			Pwhash: "12345",
		},
		"larry": {
			Email:  "*****@*****.**",
			Pwhash: "54321",
		},
	}
}
Exemplo n.º 2
0
func (s *AuthSuite) SetUpTest(c *gc.C) {
	d, err := t.NewTestingDB(
		t.SetupBolt("test.db"),
		t.SetupBuckets(auth.Buckets()),
	)
	c.Assert(err, gc.IsNil)
	s.d = d
	s.users = map[string]t.TestUser{
		"bob": {
			Email:  "*****@*****.**",
			Pwhash: "12345",
		},
		"larry": {
			Email:  "*****@*****.**",
			Pwhash: "54321",
		},
	}
	auth.SetTimeout(time.Duration(50) * time.Millisecond)
}