Bladeren bron

libnetwork: remove unused "testutils" imports

Perhaps the testutils package in the past had an `init()` function to set up
specific things, but it no longer has. so these imports were doing nothing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 3 jaren geleden
bovenliggende
commit
427ad30c05
33 gewijzigde bestanden met toevoegingen van 0 en 47 verwijderingen
  1. 0 3
      cmd/docker-proxy/network_proxy_test.go
  2. 0 1
      libnetwork/bitseq/sequence_test.go
  3. 0 1
      libnetwork/config/config_test.go
  4. 0 1
      libnetwork/datastore/datastore_test.go
  5. 0 1
      libnetwork/driverapi/driverapi_test.go
  6. 0 1
      libnetwork/drivers/host/host_test.go
  7. 0 1
      libnetwork/drivers/ipvlan/ipvlan_test.go
  8. 0 1
      libnetwork/drivers/macvlan/macvlan_test.go
  9. 0 1
      libnetwork/drivers/null/null_test.go
  10. 0 1
      libnetwork/drivers/overlay/overlay_test.go
  11. 0 1
      libnetwork/drivers/overlay/ovmanager/ovmanager_test.go
  12. 0 2
      libnetwork/drivers/overlay/peerdb_test.go
  13. 0 1
      libnetwork/drivers/remote/driver_test.go
  14. 0 3
      libnetwork/drvregistry/drvregistry_test.go
  15. 0 1
      libnetwork/etchosts/etchosts_test.go
  16. 0 1
      libnetwork/hostdiscovery/hostdiscovery_test.go
  17. 0 2
      libnetwork/idm/idm_test.go
  18. 0 2
      libnetwork/internal/caller/caller_test.go
  19. 0 2
      libnetwork/internal/setmatrix/setmatrix_test.go
  20. 0 1
      libnetwork/ipam/allocator_test.go
  21. 0 1
      libnetwork/ipams/null/null_test.go
  22. 0 1
      libnetwork/ipams/remote/remote_test.go
  23. 0 1
      libnetwork/ipams/windowsipam/windowsipam_test.go
  24. 0 1
      libnetwork/ipamutils/utils_test.go
  25. 0 1
      libnetwork/iptables/iptables_test.go
  26. 0 2
      libnetwork/netlabel/labels_test.go
  27. 0 3
      libnetwork/networkdb/networkdb_test.go
  28. 0 2
      libnetwork/options/options_test.go
  29. 0 2
      libnetwork/osl/kernel/knobs_linux_test.go
  30. 0 2
      libnetwork/portallocator/portallocator_test.go
  31. 0 1
      libnetwork/portmapper/mapper_linux_test.go
  32. 0 1
      libnetwork/resolvconf/resolvconf_linux_test.go
  33. 0 1
      libnetwork/types/types_test.go

+ 0 - 3
cmd/docker-proxy/network_proxy_test.go

@@ -13,9 +13,6 @@ import (
 
 	"github.com/ishidawataru/sctp"
 	"gotest.tools/v3/skip"
-
-	// this takes care of the incontainer flag
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 var testBuf = []byte("Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo")

+ 0 - 1
libnetwork/bitseq/sequence_test.go

@@ -10,7 +10,6 @@ import (
 	"time"
 
 	"github.com/docker/docker/libnetwork/datastore"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/libkv/store"
 	"github.com/docker/libkv/store/boltdb"
 )

+ 0 - 1
libnetwork/config/config_test.go

@@ -8,7 +8,6 @@ import (
 
 	"github.com/docker/docker/libnetwork/datastore"
 	"github.com/docker/docker/libnetwork/netlabel"
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func TestInvalidConfig(t *testing.T) {

+ 0 - 1
libnetwork/datastore/datastore_test.go

@@ -6,7 +6,6 @@ import (
 	"testing"
 
 	"github.com/docker/docker/libnetwork/options"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"gotest.tools/v3/assert"
 )
 

+ 0 - 1
libnetwork/driverapi/driverapi_test.go

@@ -5,7 +5,6 @@ import (
 	"net"
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 )
 

+ 0 - 1
libnetwork/drivers/host/host_test.go

@@ -3,7 +3,6 @@ package host
 import (
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 )
 

+ 0 - 1
libnetwork/drivers/ipvlan/ipvlan_test.go

@@ -6,7 +6,6 @@ import (
 	"testing"
 
 	"github.com/docker/docker/libnetwork/driverapi"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/pkg/plugingetter"
 )
 

+ 0 - 1
libnetwork/drivers/macvlan/macvlan_test.go

@@ -6,7 +6,6 @@ import (
 	"testing"
 
 	"github.com/docker/docker/libnetwork/driverapi"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/pkg/plugingetter"
 )
 

+ 0 - 1
libnetwork/drivers/null/null_test.go

@@ -3,7 +3,6 @@ package null
 import (
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 )
 

+ 0 - 1
libnetwork/drivers/overlay/overlay_test.go

@@ -17,7 +17,6 @@ import (
 	"github.com/docker/docker/libnetwork/discoverapi"
 	"github.com/docker/docker/libnetwork/driverapi"
 	"github.com/docker/docker/libnetwork/netlabel"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/pkg/plugingetter"
 	"github.com/docker/libkv/store/consul"
 	"github.com/vishvananda/netlink/nl"

+ 0 - 1
libnetwork/drivers/overlay/ovmanager/ovmanager_test.go

@@ -9,7 +9,6 @@ import (
 	"github.com/docker/docker/libnetwork/driverapi"
 	"github.com/docker/docker/libnetwork/idm"
 	"github.com/docker/docker/libnetwork/netlabel"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 	"gotest.tools/v3/assert"
 	is "gotest.tools/v3/assert/cmp"

+ 0 - 2
libnetwork/drivers/overlay/peerdb_test.go

@@ -5,8 +5,6 @@ package overlay
 import (
 	"net"
 	"testing"
-
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func TestPeerMarshal(t *testing.T) {

+ 0 - 1
libnetwork/drivers/remote/driver_test.go

@@ -18,7 +18,6 @@ import (
 	"github.com/docker/docker/libnetwork/datastore"
 	"github.com/docker/docker/libnetwork/discoverapi"
 	"github.com/docker/docker/libnetwork/driverapi"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 	"github.com/docker/docker/pkg/plugins"
 )

+ 0 - 3
libnetwork/drvregistry/drvregistry_test.go

@@ -14,9 +14,6 @@ import (
 	remoteIpam "github.com/docker/docker/libnetwork/ipams/remote"
 	"gotest.tools/v3/assert"
 	is "gotest.tools/v3/assert/cmp"
-
-	// this takes care of the incontainer flag
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 const mockDriverName = "mock-driver"

+ 0 - 1
libnetwork/etchosts/etchosts_test.go

@@ -7,7 +7,6 @@ import (
 	"os"
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"golang.org/x/sync/errgroup"
 )
 

+ 0 - 1
libnetwork/hostdiscovery/hostdiscovery_test.go

@@ -5,7 +5,6 @@ import (
 	"testing"
 
 	mapset "github.com/deckarep/golang-set"
-	_ "github.com/docker/docker/libnetwork/testutils"
 
 	"github.com/docker/docker/pkg/discovery"
 )

+ 0 - 2
libnetwork/idm/idm_test.go

@@ -2,8 +2,6 @@ package idm
 
 import (
 	"testing"
-
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func TestNew(t *testing.T) {

+ 0 - 2
libnetwork/internal/caller/caller_test.go

@@ -2,8 +2,6 @@ package caller
 
 import (
 	"testing"
-
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func fun1() string {

+ 0 - 2
libnetwork/internal/setmatrix/setmatrix_test.go

@@ -6,8 +6,6 @@ import (
 	"strings"
 	"testing"
 	"time"
-
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func TestSetSerialInsertDelete(t *testing.T) {

+ 0 - 1
libnetwork/ipam/allocator_test.go

@@ -17,7 +17,6 @@ import (
 	"github.com/docker/docker/libnetwork/bitseq"
 	"github.com/docker/docker/libnetwork/datastore"
 	"github.com/docker/docker/libnetwork/ipamapi"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 	"github.com/docker/libkv/store"
 	"github.com/docker/libkv/store/boltdb"

+ 0 - 1
libnetwork/ipams/null/null_test.go

@@ -3,7 +3,6 @@ package null
 import (
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 )
 

+ 0 - 1
libnetwork/ipams/remote/remote_test.go

@@ -14,7 +14,6 @@ import (
 	"testing"
 
 	"github.com/docker/docker/libnetwork/ipamapi"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/pkg/plugins"
 )
 

+ 0 - 1
libnetwork/ipams/windowsipam/windowsipam_test.go

@@ -6,7 +6,6 @@ import (
 
 	"github.com/docker/docker/libnetwork/ipamapi"
 	"github.com/docker/docker/libnetwork/netlabel"
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 )
 

+ 0 - 1
libnetwork/ipamutils/utils_test.go

@@ -4,7 +4,6 @@ import (
 	"net"
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"gotest.tools/v3/assert"
 	is "gotest.tools/v3/assert/cmp"
 )

+ 0 - 1
libnetwork/iptables/iptables_test.go

@@ -9,7 +9,6 @@ import (
 	"strings"
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"golang.org/x/sync/errgroup"
 )
 

+ 0 - 2
libnetwork/netlabel/labels_test.go

@@ -2,8 +2,6 @@ package netlabel
 
 import (
 	"testing"
-
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 var input = []struct {

+ 0 - 3
libnetwork/networkdb/networkdb_test.go

@@ -18,9 +18,6 @@ import (
 	"gotest.tools/v3/assert"
 	is "gotest.tools/v3/assert/cmp"
 	"gotest.tools/v3/poll"
-
-	// this takes care of the incontainer flag
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 var dbPort int32 = 10000

+ 0 - 2
libnetwork/options/options_test.go

@@ -4,8 +4,6 @@ import (
 	"reflect"
 	"strings"
 	"testing"
-
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func TestGenerate(t *testing.T) {

+ 0 - 2
libnetwork/osl/kernel/knobs_linux_test.go

@@ -6,8 +6,6 @@ import (
 	"github.com/sirupsen/logrus"
 	"gotest.tools/v3/assert"
 	is "gotest.tools/v3/assert/cmp"
-
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func TestReadWriteKnobs(t *testing.T) {

+ 0 - 2
libnetwork/portallocator/portallocator_test.go

@@ -4,8 +4,6 @@ import (
 	"fmt"
 	"net"
 	"testing"
-
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func resetPortAllocator() {

+ 0 - 1
libnetwork/portmapper/mapper_linux_test.go

@@ -6,7 +6,6 @@ import (
 	"testing"
 
 	"github.com/docker/docker/libnetwork/iptables"
-	_ "github.com/docker/docker/libnetwork/testutils"
 )
 
 func init() {

+ 0 - 1
libnetwork/resolvconf/resolvconf_linux_test.go

@@ -6,7 +6,6 @@ import (
 	"os"
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"github.com/docker/docker/libnetwork/types"
 	"github.com/docker/docker/pkg/ioutils"
 )

+ 0 - 1
libnetwork/types/types_test.go

@@ -4,7 +4,6 @@ import (
 	"net"
 	"testing"
 
-	_ "github.com/docker/docker/libnetwork/testutils"
 	"gotest.tools/v3/assert"
 	is "gotest.tools/v3/assert/cmp"
 )