"fake-prop-key": "fake-prop-value", }, }, tempExtractionDir, fs, ) reader.SetReadBehavior(stemcellTarballPath, tempExtractionDir, expectedExtractedStemcell, nil) }) Describe("Upload", func() { var ( expectedCloudStemcell CloudStemcell ) BeforeEach(func() { fakeCloud.CreateStemcellCID = "fake-stemcell-cid" stemcellRecord := biconfig.StemcellRecord{ CID: "fake-stemcell-cid", Name: "fake-stemcell-name", Version: "fake-stemcell-version", } expectedCloudStemcell = NewCloudStemcell(stemcellRecord, stemcellRepo, fakeCloud) }) It("uploads the stemcell to the infrastructure and returns the cid", func() { cloudStemcell, err := manager.Upload(expectedExtractedStemcell, fakeStage) Expect(err).ToNot(HaveOccurred()) Expect(cloudStemcell).To(Equal(expectedCloudStemcell)) Expect(fakeCloud.CreateStemcellInputs).To(Equal([]fakebicloud.CreateStemcellInput{ {