зеркало из https://github.com/microsoft/docker.git
Merge pull request #26481 from AkihiroSuda/nit-fix-convention-26467
[nit] test: fix trivial code convention noncompliance
This commit is contained in:
Коммит
e391e83804
|
@ -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"
|
||||
|
|
Загрузка…
Ссылка в новой задаче