예제 #1
0
파일: push_test.go 프로젝트: nota-ja/cli
	testreq "testhelpers/requirements"
	testterm "testhelpers/terminal"
	testwords "testhelpers/words"
	"words"
)

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{}
예제 #2
0
파일: push_test.go 프로젝트: juggernaut/cli
	testmanifest "testhelpers/manifest"
	testreq "testhelpers/requirements"
	testterm "testhelpers/terminal"
	testwords "testhelpers/words"
	"words"
)

var _ = Describe("Push Command", func() {
	var (
		cmd           *Push
		ui            *testterm.FakeUI
		configRepo    configuration.ReadWriter
		manifestRepo  *testmanifest.FakeManifestRepository
		starter       *testcmd.FakeAppStarter
		stopper       *testcmd.FakeAppStopper
		binder        *testcmd.FakeAppBinder
		appRepo       *testapi.FakeApplicationRepository
		domainRepo    *testapi.FakeDomainRepository
		routeRepo     *testapi.FakeRouteRepository
		stackRepo     *testapi.FakeStackRepository
		appBitsRepo   *testapi.FakeApplicationBitsRepository
		serviceRepo   *testapi.FakeServiceRepo
		wordGenerator words.WordGenerator
	)

	BeforeEach(func() {
		manifestRepo = &testmanifest.FakeManifestRepository{}
		starter = &testcmd.FakeAppStarter{}
		stopper = &testcmd.FakeAppStopper{}
		binder = &testcmd.FakeAppBinder{}
		appRepo = &testapi.FakeApplicationRepository{}
예제 #3
0
파일: scale_test.go 프로젝트: knolleary/cli
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	testapi "testhelpers/api"
	testassert "testhelpers/assert"
	testcmd "testhelpers/commands"
	testconfig "testhelpers/configuration"
	"testhelpers/maker"
	testreq "testhelpers/requirements"
	testterm "testhelpers/terminal"
)

var _ = Describe("scale command", func() {
	var (
		reqFactory *testreq.FakeReqFactory
		restarter  *testcmd.FakeAppRestarter
		appRepo    *testapi.FakeApplicationRepository
		ui         *testterm.FakeUI
		configRepo configuration.Repository
		cmd        *Scale
	)

	BeforeEach(func() {
		reqFactory = &testreq.FakeReqFactory{LoginSuccess: true, TargetedSpaceSuccess: true}
		restarter = &testcmd.FakeAppRestarter{}
		appRepo = &testapi.FakeApplicationRepository{}
		ui = new(testterm.FakeUI)
		configRepo = testconfig.NewRepositoryWithDefaults()
		cmd = NewScale(ui, configRepo, restarter, appRepo)
	})

	Describe("requirements", func() {
		It("requires the user to be logged in with a targed space", func() {