Skip to content

Commit

Permalink
Remove timer and use -check.v for tests formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Morozov <[email protected]>
  • Loading branch information
LK4D4 committed Jun 18, 2015
1 parent d754421 commit 4253a1f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
1 change: 1 addition & 0 deletions hack/make/test-integration-cli
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -e

bundle_test_integration_cli() {
TESTFLAGS="$TESTFLAGS -check.v"
go_test_dir ./integration-cli
}

Expand Down
18 changes: 0 additions & 18 deletions integration-cli/check_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package main

import (
"fmt"
"testing"
"time"

"github.com/go-check/check"
)
Expand All @@ -12,30 +10,16 @@ func Test(t *testing.T) {
check.TestingT(t)
}

type TimerSuite struct {
start time.Time
}

func (s *TimerSuite) SetUpTest(c *check.C) {
s.start = time.Now()
}

func (s *TimerSuite) TearDownTest(c *check.C) {
fmt.Printf("%-60s%.2f\n", c.TestName(), time.Since(s.start).Seconds())
}

func init() {
check.Suite(&DockerSuite{})
}

type DockerSuite struct {
TimerSuite
}

func (s *DockerSuite) TearDownTest(c *check.C) {
deleteAllContainers()
deleteAllImages()
s.TimerSuite.TearDownTest(c)
}

func init() {
Expand All @@ -51,7 +35,6 @@ type DockerRegistrySuite struct {

func (s *DockerRegistrySuite) SetUpTest(c *check.C) {
s.reg = setupRegistry(c)
s.ds.SetUpTest(c)
}

func (s *DockerRegistrySuite) TearDownTest(c *check.C) {
Expand All @@ -72,7 +55,6 @@ type DockerDaemonSuite struct {

func (s *DockerDaemonSuite) SetUpTest(c *check.C) {
s.d = NewDaemon(c)
s.ds.SetUpTest(c)
}

func (s *DockerDaemonSuite) TearDownTest(c *check.C) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ type DockerExternalVolumeSuite struct {

func (s *DockerExternalVolumeSuite) SetUpTest(c *check.C) {
s.d = NewDaemon(c)
s.ds.SetUpTest(c)
s.ec = &eventCounter{}

}
Expand Down

0 comments on commit 4253a1f

Please sign in to comment.