package ip_test import ( "errors" "net" "github.com/cloudfoundry-incubator/ducati-cni-plugins/lib/ip" "github.com/cloudfoundry-incubator/ducati-cni-plugins/lib/nl/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/vishvananda/netlink" ) var _ = Describe("RouteManager", func() { var ( netlinker *fakes.Netlinker routeManager *ip.RouteManager ) BeforeEach(func() { netlinker = &fakes.Netlinker{} routeManager = &ip.RouteManager{ Netlinker: netlinker, } }) Describe("AddRoute", func() { var ( link netlink.Link network *net.IPNet gateway net.IP )
package ip_test import ( "errors" "net" "github.com/cloudfoundry-incubator/ducati-cni-plugins/lib/ip" "github.com/cloudfoundry-incubator/ducati-cni-plugins/lib/nl/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/vishvananda/netlink" ) var _ = Describe("AddressManager", func() { var ( netlinker *fakes.Netlinker addressManager *ip.AddressManager ) BeforeEach(func() { netlinker = &fakes.Netlinker{} addressManager = &ip.AddressManager{ Netlinker: netlinker, } }) Describe("AddAddress", func() { var ( link netlink.Link address *net.IPNet )
import ( "errors" "net" "github.com/cloudfoundry-incubator/ducati-cni-plugins/lib/links" "github.com/cloudfoundry-incubator/ducati-cni-plugins/lib/nl/fakes" "github.com/vishvananda/netlink" "github.com/vishvananda/netlink/nl" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("Factory", func() { var ( factory *links.Factory netlinker *fakes.Netlinker ) BeforeEach(func() { netlinker = &fakes.Netlinker{} factory = &links.Factory{ Netlinker: netlinker, } }) Describe("CreateBridge", func() { var ( expectedBridge *netlink.Bridge address *net.IPNet )