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("StartMonitor", func() { var ( context *fakes.Context sandboxRepository *fakes.Repository startMonitor commands.StartMonitor fakeWatcher *fakes.MissWatcher hostNS *fakes.Namespace sandboxNS *fakes.Namespace ) BeforeEach(func() { context = &fakes.Context{} sandboxRepository = &fakes.Repository{} context.SandboxNamespaceRepositoryReturns(sandboxRepository) sandboxNS = &fakes.Namespace{} sandboxRepository.GetReturns(sandboxNS, nil) hostNS = &fakes.Namespace{}
"github.com/cloudfoundry-incubator/ducati-daemon/fakes" "github.com/cloudfoundry-incubator/ducati-daemon/sandbox" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" "github.com/pivotal-golang/lager/lagertest" ) var _ = Describe("Sandbox Repository", func() { var ( logger *lagertest.TestLogger locker *fakes.Locker sboxNamespace *fakes.Namespace namespaceRepo *fakes.Repository invoker *fakes.Invoker sandboxRepo *sandbox.Repository linkFactory *fakes.LinkFactory missWatcher *fakes.MissWatcher sandboxCallback *fakes.SandboxCallback sandboxFactory *fakes.SandboxFactory ) BeforeEach(func() { logger = lagertest.NewTestLogger("test") locker = &fakes.Locker{} invoker = &fakes.Invoker{} sboxNamespace = &fakes.Namespace{} namespaceRepo = &fakes.Repository{} namespaceRepo.CreateReturns(sboxNamespace, nil) linkFactory = &fakes.LinkFactory{} sandboxCallback = &fakes.SandboxCallback{}