"github.com/cloudfoundry-incubator/ducati-daemon/executor/commands" "github.com/cloudfoundry-incubator/ducati-daemon/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("Start DNS Server", func() { var ( ns *fakes.Namespace context *fakes.Context listenerFactory *fakes.ListenerFactory linkFactory *fakes.LinkFactory addressManager *fakes.AddressManager dnsServerFactory *fakes.DNSServerFactory returnedListener *net.UDPConn sandboxRepo *fakes.SandboxRepository sbox *fakes.Sandbox dnsServer *fakes.Runner startDNS commands.StartDNSServer ) BeforeEach(func() { listenerFactory = &fakes.ListenerFactory{} linkFactory = &fakes.LinkFactory{} addressManager = &fakes.AddressManager{} dnsServerFactory = &fakes.DNSServerFactory{} ns = &fakes.Namespace{}
package commands_test import ( "errors" "net" "github.com/cloudfoundry-incubator/ducati-daemon/executor/commands" "github.com/cloudfoundry-incubator/ducati-daemon/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("AddAddress", func() { var ( addressManager *fakes.AddressManager context *fakes.Context addAddress commands.AddAddress ) BeforeEach(func() { addressManager = &fakes.AddressManager{} context = &fakes.Context{} context.AddressManagerReturns(addressManager) addAddress = commands.AddAddress{ InterfaceName: "my-interface", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(24, 32), }, }