Example #1
0
	fakeBits "github.com/nttlabs/cli/cf/api/application_bits/fakes"
	"github.com/nttlabs/cli/cf/api/resources"
	"github.com/nttlabs/cli/cf/app_files/fakes"
	"github.com/nttlabs/cli/cf/models"
	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	"os"
	"path/filepath"
)

var _ = Describe("Push Actor", func() {
	var (
		appBitsRepo  *fakeBits.FakeApplicationBitsRepository
		appFiles     *fakes.FakeAppFiles
		zipper       *fakes.FakeZipper
		actor        actors.PushActor
		fixturesDir  string
		appDir       string
		allFiles     []models.AppFileFields
		presentFiles []resources.AppFileResource
	)

	BeforeEach(func() {
		appBitsRepo = &fakeBits.FakeApplicationBitsRepository{}
		appFiles = &fakes.FakeAppFiles{}
		zipper = &fakes.FakeZipper{}
		actor = actors.NewPushActor(appBitsRepo, zipper, appFiles)
		fixturesDir = filepath.Join("..", "..", "fixtures", "applications")
	})

	Describe("GatherFiles", func() {
		BeforeEach(func() {
Example #2
0
	. "github.com/nttlabs/cli/testhelpers/matchers"
)

var _ = Describe("Push Command", func() {
	var (
		cmd                 *Push
		ui                  *testterm.FakeUI
		configRepo          core_config.ReadWriter
		manifestRepo        *testmanifest.FakeManifestRepository
		starter             *testcmd.FakeApplicationStarter
		stopper             *testcmd.FakeApplicationStopper
		serviceBinder       *testcmd.FakeAppBinder
		appRepo             *testApplication.FakeApplicationRepository
		domainRepo          *testapi.FakeDomainRepository
		routeRepo           *testapi.FakeRouteRepository
		stackRepo           *testStacks.FakeStackRepository
		serviceRepo         *testapi.FakeServiceRepo
		wordGenerator       *testwords.FakeWordGenerator
		requirementsFactory *testreq.FakeReqFactory
		authRepo            *testapi.FakeAuthenticationRepository
		actor               *fakeactors.FakePushActor
		app_files           *fakeappfiles.FakeAppFiles
		zipper              *fakeappfiles.FakeZipper
		zoneRepo            *testapi.FakeZoneRepository
	)

	BeforeEach(func() {
		manifestRepo = &testmanifest.FakeManifestRepository{}
		starter = &testcmd.FakeApplicationStarter{}
		stopper = &testcmd.FakeApplicationStopper{}