本文整理匯總了Golang中github.com/cloudfoundry/bosh-init/config.StemcellRepo類的典型用法代碼示例。如果您正苦於以下問題:Golang StemcellRepo類的具體用法?Golang StemcellRepo怎麽用?Golang StemcellRepo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了StemcellRepo類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
})
})
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()
示例2:
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)