forked from juju/testing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
isolation.go
40 lines (33 loc) · 920 Bytes
/
isolation.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2014 Canonical Ltd.
// Licensed under the LGPLv3, see LICENCE file for details.
package testing
import (
gc "gopkg.in/check.v1"
)
// IsolationSuite isolates the tests from the underlaying system environment,
// sets up test logging and exposes cleanup facilities.
type IsolationSuite struct {
OsEnvSuite
CleanupSuite
LoggingSuite
}
func (s *IsolationSuite) SetUpSuite(c *gc.C) {
s.OsEnvSuite.SetUpSuite(c)
s.CleanupSuite.SetUpSuite(c)
s.LoggingSuite.SetUpSuite(c)
}
func (s *IsolationSuite) TearDownSuite(c *gc.C) {
s.LoggingSuite.TearDownSuite(c)
s.CleanupSuite.TearDownSuite(c)
s.OsEnvSuite.TearDownSuite(c)
}
func (s *IsolationSuite) SetUpTest(c *gc.C) {
s.OsEnvSuite.SetUpTest(c)
s.CleanupSuite.SetUpTest(c)
s.LoggingSuite.SetUpTest(c)
}
func (s *IsolationSuite) TearDownTest(c *gc.C) {
s.LoggingSuite.TearDownTest(c)
s.CleanupSuite.TearDownTest(c)
s.OsEnvSuite.TearDownTest(c)
}