cmd := command_registry.Commands.FindCommand("start").(*Start) cmd.LogServerConnectionTimeout = 100 * time.Millisecond cmd.StagingTimeout = 100 * time.Millisecond cmd.StartupTimeout = 200 * time.Millisecond cmd.PingerThrottle = 50 * time.Millisecond command_registry.Register(cmd) testcmd.RunCliCommandWithoutDependency("start", args, requirementsFactory) return } startAppWithInstancesAndErrors := func(displayApp ApplicationDisplayer, app models.Application, requirementsFactory *testreq.FakeReqFactory) (*testterm.FakeUI, *testApplication.FakeApplicationRepository, *testAppInstanaces.FakeAppInstancesRepository) { appRepo = &testApplication.FakeApplicationRepository{} appRepo.UpdateReturns(app, nil) appRepo.ReadReturns(app, nil) appRepo.GetAppReturns(app, nil) appInstancesRepo = &testAppInstanaces.FakeAppInstancesRepository{} appInstancesRepo.GetInstancesStub = getInstance args := []string{"my-app"} requirementsFactory.Application = app callStart(args) return ui, appRepo, appInstancesRepo } It("fails requirements when not logged in", func() { requirementsFactory.LoginSuccess = false Expect(callStart([]string{"some-app-name"})).To(BeFalse()) })