Exemple #1
0
		})
	})

	Describe("Cleanup", func() {
		var (
			logger boshlog.Logger
			fs     boshsys.FileSystem

			mockDeploymentFactory *mock_deployment.MockFactory

			mockStateBuilderFactory *mock_instance_state.MockBuilderFactory

			mockBlobstore *mock_blobstore.MockBlobstore

			fakeUUIDGenerator      *fakeuuid.FakeGenerator
			fakeRepoUUIDGenerator  *fakeuuid.FakeGenerator
			deploymentStateService biconfig.DeploymentStateService
			vmRepo                 biconfig.VMRepo
			diskRepo               biconfig.DiskRepo
			stemcellRepo           biconfig.StemcellRepo

			mockCloud       *mock_cloud.MockCloud
			mockAgentClient *mock_agentclient.MockAgentClient

			fakeStage *fakebiui.FakeStage

			deploymentManager Manager
		)

		BeforeEach(func() {
			logger = boshlog.NewLogger(boshlog.LevelNone)
			fs = fakesys.NewFakeFileSystem()
Exemple #2
0
	fakesys "github.com/cloudfoundry/bosh-utils/system/fakes"
	fakeuuid "github.com/cloudfoundry/bosh-utils/uuid/fakes"

	fakebicloud "github.com/cloudfoundry/bosh-init/cloud/fakes"
	fakebistemcell "github.com/cloudfoundry/bosh-init/stemcell/fakes"
	fakebiui "github.com/cloudfoundry/bosh-init/ui/fakes"
)

var _ = Describe("Manager", func() {
	var (
		stemcellRepo        biconfig.StemcellRepo
		fakeUUIDGenerator   *fakeuuid.FakeGenerator
		manager             Manager
		fs                  *fakesys.FakeFileSystem
		reader              *fakebistemcell.FakeStemcellReader
		fakeCloud           *fakebicloud.FakeCloud
		fakeStage           *fakebiui.FakeStage
		stemcellTarballPath string
		tempExtractionDir   string

		expectedExtractedStemcell ExtractedStemcell
	)

	BeforeEach(func() {
		fs = fakesys.NewFakeFileSystem()
		reader = fakebistemcell.NewFakeReader()
		logger := boshlog.NewLogger(boshlog.LevelNone)
		fakeUUIDGenerator = &fakeuuid.FakeGenerator{}
		deploymentStateService := biconfig.NewFileSystemDeploymentStateService(fs, fakeUUIDGenerator, logger, "/fake/path")
		fakeUUIDGenerator.GeneratedUUID = "fake-stemcell-id-1"
		stemcellRepo = biconfig.NewStemcellRepo(deploymentStateService, fakeUUIDGenerator)