Esempio n. 1
0
		ui = new(testterm.FakeUI)
		configRepo = testconfig.NewRepositoryWithDefaults()

		requirementsFactory = &testreq.FakeReqFactory{LoginSuccess: true, TargetedSpaceSuccess: true}

		zipper = &fakeappfiles.FakeZipper{}
		appfiles = &fakeappfiles.FakeAppFiles{}
		appfiles.AppFilesInDirReturns([]models.AppFileFields{
			{
				Path: "some-path",
			},
		}, nil)
		actor = &fakeactors.FakePushActor{}
		actor.ProcessPathStub = func(dirOrZipFile string, f func(string)) error {
			f(dirOrZipFile)
			return nil
		}
	})

	AfterEach(func() {
		command_registry.Register(OriginalCommandStart)
		command_registry.Register(OriginalCommandStop)
		command_registry.Register(OriginalCommandServiceBind)
	})

	callPush := func(args ...string) bool {
		return testcmd.RunCliCommand("push", args, requirementsFactory, updateCommandDependency, false)
	}

	Describe("requirements", func() {
		It("passes when logged in and a space is targeted", func() {