diff --git a/libnetwork/ipam/allocator.go b/libnetwork/ipam/allocator.go index 255f8932c0..9ff3301baa 100644 --- a/libnetwork/ipam/allocator.go +++ b/libnetwork/ipam/allocator.go @@ -6,7 +6,6 @@ import ( "sync" log "github.com/Sirupsen/logrus" - "github.com/docker/libkv/store/boltdb" "github.com/docker/libnetwork/bitseq" "github.com/docker/libnetwork/datastore" "github.com/docker/libnetwork/discoverapi" @@ -26,10 +25,6 @@ const ( dsDataKey = "ipam/" + ipamapi.DefaultIPAM + "/data" ) -func init() { - boltdb.Register() -} - // Allocator provides per address space ipv4/ipv6 book keeping type Allocator struct { // Predefined pools for default address spaces diff --git a/libnetwork/ipam/allocator_test.go b/libnetwork/ipam/allocator_test.go index c5c07e83d4..c7f84a6122 100644 --- a/libnetwork/ipam/allocator_test.go +++ b/libnetwork/ipam/allocator_test.go @@ -12,6 +12,7 @@ import ( "time" "github.com/docker/libkv/store" + "github.com/docker/libkv/store/boltdb" "github.com/docker/libnetwork/bitseq" "github.com/docker/libnetwork/datastore" "github.com/docker/libnetwork/ipamapi" @@ -24,6 +25,10 @@ const ( defaultPrefix = "/tmp/libnetwork/test/ipam" ) +func init() { + boltdb.Register() +} + // OptionBoltdbWithRandomDBFile function returns a random dir for local store backend func randomLocalStore() (datastore.DataStore, error) { tmp, err := ioutil.TempFile("", "libnetwork-")