"errors" "github.com/cloudfoundry-incubator/ducati-daemon/executor" "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("Commands", func() { Describe("All", func() { var ( context *fakes.Context command1 *fakes.Command command2 *fakes.Command command3 *fakes.Command all executor.Command ) BeforeEach(func() { context = &fakes.Context{} command1 = &fakes.Command{} command2 = &fakes.Command{} command3 = &fakes.Command{} command1.StringReturns("some-command 1") command2.StringReturns("some-command 2") command3.StringReturns("some-command 3")
import ( "errors" "os" "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("ExecuteInNamespace", func() { var ( context *fakes.Context namespace *fakes.Namespace command *fakes.Command inNamespace commands.InNamespace ) BeforeEach(func() { context = &fakes.Context{} command = &fakes.Command{} command.StringReturns("some-command") namespace = &fakes.Namespace{} namespace.NameReturns("namespace-name") namespace.ExecuteStub = func(callback func(*os.File) error) error { Expect(command.ExecuteCallCount()).To(Equal(0))
import ( "github.com/cloudfoundry-incubator/ducati-daemon/executor" "github.com/cloudfoundry-incubator/ducati-daemon/fakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/pivotal-golang/lager/lagertest" ) var _ = Describe("Executor", func() { var ( logger *lagertest.TestLogger addressManager *fakes.AddressManager routeManager *fakes.RouteManager linkFactory *fakes.LinkFactory sandboxNamespaceRepository *fakes.Repository sandboxRepository *fakes.SandboxRepository listenerFactory *fakes.ListenerFactory dnsServerFactory *fakes.DNSServerFactory command *fakes.Command ex executor.Executor ) BeforeEach(func() { logger = lagertest.NewTestLogger("test") addressManager = &fakes.AddressManager{} routeManager = &fakes.RouteManager{} linkFactory = &fakes.LinkFactory{} sandboxNamespaceRepository = &fakes.Repository{} sandboxRepository = &fakes.SandboxRepository{} listenerFactory = &fakes.ListenerFactory{} dnsServerFactory = &fakes.DNSServerFactory{}