Browse code

Remove timer and use -check.v for tests formatting

Signed-off-by: Alexander Morozov <lk4d4@docker.com>

Alexander Morozov authored on 2015/06/06 05:48:25
Showing 3 changed files
... ...
@@ -2,6 +2,7 @@
2 2
 set -e
3 3
 
4 4
 bundle_test_integration_cli() {
5
+	TESTFLAGS="$TESTFLAGS -check.v"
5 6
 	go_test_dir ./integration-cli
6 7
 }
7 8
 
... ...
@@ -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) {
... ...
@@ -40,7 +40,6 @@ type DockerExternalVolumeSuite struct {
40 40
 
41 41
 func (s *DockerExternalVolumeSuite) SetUpTest(c *check.C) {
42 42
 	s.d = NewDaemon(c)
43
-	s.ds.SetUpTest(c)
44 43
 	s.ec = &eventCounter{}
45 44
 
46 45
 }