コード例 #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() {