Signed-off-by: Alexander Morozov <lk4d4@docker.com>
| ... | ... |
@@ -1,9 +1,7 @@ |
| 1 | 1 |
package main |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 |
- "fmt" |
|
| 5 | 4 |
"testing" |
| 6 |
- "time" |
|
| 7 | 5 |
|
| 8 | 6 |
"github.com/go-check/check" |
| 9 | 7 |
) |
| ... | ... |
@@ -12,30 +10,16 @@ func Test(t *testing.T) {
|
| 12 | 12 |
check.TestingT(t) |
| 13 | 13 |
} |
| 14 | 14 |
|
| 15 |
-type TimerSuite struct {
|
|
| 16 |
- start time.Time |
|
| 17 |
-} |
|
| 18 |
- |
|
| 19 |
-func (s *TimerSuite) SetUpTest(c *check.C) {
|
|
| 20 |
- s.start = time.Now() |
|
| 21 |
-} |
|
| 22 |
- |
|
| 23 |
-func (s *TimerSuite) TearDownTest(c *check.C) {
|
|
| 24 |
- fmt.Printf("%-60s%.2f\n", c.TestName(), time.Since(s.start).Seconds())
|
|
| 25 |
-} |
|
| 26 |
- |
|
| 27 | 15 |
func init() {
|
| 28 | 16 |
check.Suite(&DockerSuite{})
|
| 29 | 17 |
} |
| 30 | 18 |
|
| 31 | 19 |
type DockerSuite struct {
|
| 32 |
- TimerSuite |
|
| 33 | 20 |
} |
| 34 | 21 |
|
| 35 | 22 |
func (s *DockerSuite) TearDownTest(c *check.C) {
|
| 36 | 23 |
deleteAllContainers() |
| 37 | 24 |
deleteAllImages() |
| 38 |
- s.TimerSuite.TearDownTest(c) |
|
| 39 | 25 |
} |
| 40 | 26 |
|
| 41 | 27 |
func init() {
|
| ... | ... |
@@ -51,7 +35,6 @@ type DockerRegistrySuite struct {
|
| 51 | 51 |
|
| 52 | 52 |
func (s *DockerRegistrySuite) SetUpTest(c *check.C) {
|
| 53 | 53 |
s.reg = setupRegistry(c) |
| 54 |
- s.ds.SetUpTest(c) |
|
| 55 | 54 |
} |
| 56 | 55 |
|
| 57 | 56 |
func (s *DockerRegistrySuite) TearDownTest(c *check.C) {
|
| ... | ... |
@@ -72,7 +55,6 @@ type DockerDaemonSuite struct {
|
| 72 | 72 |
|
| 73 | 73 |
func (s *DockerDaemonSuite) SetUpTest(c *check.C) {
|
| 74 | 74 |
s.d = NewDaemon(c) |
| 75 |
- s.ds.SetUpTest(c) |
|
| 76 | 75 |
} |
| 77 | 76 |
|
| 78 | 77 |
func (s *DockerDaemonSuite) TearDownTest(c *check.C) {
|