"github.com/cloudfoundry/cli/cf/models" testapi "github.com/cloudfoundry/cli/testhelpers/api" testcmd "github.com/cloudfoundry/cli/testhelpers/commands" testconfig "github.com/cloudfoundry/cli/testhelpers/configuration" testreq "github.com/cloudfoundry/cli/testhelpers/requirements" testterm "github.com/cloudfoundry/cli/testhelpers/terminal" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" . "github.com/cloudfoundry/cli/testhelpers/matchers" ) var _ = Describe("stacks command", func() { var ( ui *testterm.FakeUI cmd ListStacks repo *testapi.FakeStackRepository requirementsFactory *testreq.FakeReqFactory ) BeforeEach(func() { ui = &testterm.FakeUI{} config := testconfig.NewRepositoryWithDefaults() requirementsFactory = &testreq.FakeReqFactory{LoginSuccess: true} repo = &testapi.FakeStackRepository{} cmd = NewListStacks(ui, config, repo) }) Describe("login requirements", func() { It("fails if the user is not logged in", func() { requirementsFactory.LoginSuccess = false testcmd.RunCommand(cmd, []string{}, requirementsFactory)
"path/filepath" "syscall" . "github.com/cloudfoundry/cli/testhelpers/matchers" ) var _ = Describe("Push Command", func() { var ( cmd *Push ui *testterm.FakeUI configRepo configuration.ReadWriter manifestRepo *testmanifest.FakeManifestRepository starter *testcmd.FakeAppStarter stopper *testcmd.FakeAppStopper serviceBinder *testcmd.FakeAppBinder appRepo *testapi.FakeApplicationRepository domainRepo *testapi.FakeDomainRepository routeRepo *testapi.FakeRouteRepository stackRepo *testapi.FakeStackRepository appBitsRepo *testapi.FakeApplicationBitsRepository serviceRepo *testapi.FakeServiceRepo wordGenerator words.WordGenerator requirementsFactory *testreq.FakeReqFactory authRepo *testapi.FakeAuthenticationRepository ) BeforeEach(func() { manifestRepo = &testmanifest.FakeManifestRepository{} starter = &testcmd.FakeAppStarter{} stopper = &testcmd.FakeAppStopper{} serviceBinder = &testcmd.FakeAppBinder{} appRepo = &testapi.FakeApplicationRepository{}