Beispiel #1
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)
}
Beispiel #2
0
func (s *AuthSuite) TearDownTest(c *gc.C) {
	s.users = nil
	c.Assert(t.CleanupDB(s.d), gc.IsNil)
	auth.SetTimeout(time.Duration(5) * time.Minute)
}