mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
test: fix trivial code convention noncompliance
daemon/events/testutils: rename eventstestutils to testutils volume/testutils: rename volumetestutils to testutils Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
parent
2cce7bf33a
commit
e03cc68e3a
7 changed files with 18 additions and 18 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"github.com/docker/docker/api/types/events"
|
||||
timetypes "github.com/docker/docker/api/types/time"
|
||||
"github.com/docker/docker/daemon/events/testutils"
|
||||
eventstestutils "github.com/docker/docker/daemon/events/testutils"
|
||||
)
|
||||
|
||||
func TestEventsLog(t *testing.T) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package eventstestutils
|
||||
package testutils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/docker/docker/daemon/events/testutils"
|
||||
eventstestutils "github.com/docker/docker/daemon/events/testutils"
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
icmd "github.com/docker/docker/pkg/integration/cmd"
|
||||
"github.com/go-check/check"
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/docker/daemon/events/testutils"
|
||||
eventstestutils "github.com/docker/docker/daemon/events/testutils"
|
||||
"github.com/docker/docker/pkg/integration/checker"
|
||||
"github.com/go-check/check"
|
||||
)
|
||||
|
|
|
@ -3,7 +3,7 @@ package volumedrivers
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/volume/testutils"
|
||||
volumetestutils "github.com/docker/docker/volume/testutils"
|
||||
)
|
||||
|
||||
func TestGetDriver(t *testing.T) {
|
||||
|
|
|
@ -6,11 +6,11 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/docker/docker/volume/drivers"
|
||||
vt "github.com/docker/docker/volume/testutils"
|
||||
volumetestutils "github.com/docker/docker/volume/testutils"
|
||||
)
|
||||
|
||||
func TestCreate(t *testing.T) {
|
||||
volumedrivers.Register(vt.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("fake"), "fake")
|
||||
defer volumedrivers.Unregister("fake")
|
||||
s, err := New("")
|
||||
if err != nil {
|
||||
|
@ -39,8 +39,8 @@ func TestCreate(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestRemove(t *testing.T) {
|
||||
volumedrivers.Register(vt.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(vt.NewFakeDriver("noop"), "noop")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("noop"), "noop")
|
||||
defer volumedrivers.Unregister("fake")
|
||||
defer volumedrivers.Unregister("noop")
|
||||
s, err := New("")
|
||||
|
@ -50,7 +50,7 @@ func TestRemove(t *testing.T) {
|
|||
|
||||
// doing string compare here since this error comes directly from the driver
|
||||
expected := "no such volume"
|
||||
if err := s.Remove(vt.NoopVolume{}); err == nil || !strings.Contains(err.Error(), expected) {
|
||||
if err := s.Remove(volumetestutils.NoopVolume{}); err == nil || !strings.Contains(err.Error(), expected) {
|
||||
t.Fatalf("Expected error %q, got %v", expected, err)
|
||||
}
|
||||
|
||||
|
@ -72,8 +72,8 @@ func TestRemove(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestList(t *testing.T) {
|
||||
volumedrivers.Register(vt.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(vt.NewFakeDriver("fake2"), "fake2")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("fake2"), "fake2")
|
||||
defer volumedrivers.Unregister("fake")
|
||||
defer volumedrivers.Unregister("fake2")
|
||||
|
||||
|
@ -111,8 +111,8 @@ func TestList(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFilterByDriver(t *testing.T) {
|
||||
volumedrivers.Register(vt.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(vt.NewFakeDriver("noop"), "noop")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("noop"), "noop")
|
||||
defer volumedrivers.Unregister("fake")
|
||||
defer volumedrivers.Unregister("noop")
|
||||
s, err := New("")
|
||||
|
@ -140,8 +140,8 @@ func TestFilterByDriver(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFilterByUsed(t *testing.T) {
|
||||
volumedrivers.Register(vt.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(vt.NewFakeDriver("noop"), "noop")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("noop"), "noop")
|
||||
|
||||
s, err := New("")
|
||||
if err != nil {
|
||||
|
@ -178,7 +178,7 @@ func TestFilterByUsed(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestDerefMultipleOfSameRef(t *testing.T) {
|
||||
volumedrivers.Register(vt.NewFakeDriver("fake"), "fake")
|
||||
volumedrivers.Register(volumetestutils.NewFakeDriver("fake"), "fake")
|
||||
|
||||
s, err := New("")
|
||||
if err != nil {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package volumetestutils
|
||||
package testutils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
Loading…
Reference in a new issue