本文整理汇总了Golang中github.com/cloudfoundry/bosh-init/cloud/fakes.FakeCloud类的典型用法代码示例。如果您正苦于以下问题:Golang FakeCloud类的具体用法?Golang FakeCloud怎么用?Golang FakeCloud使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeCloud类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
bidisk "github.com/cloudfoundry/bosh-init/deployment/disk"
bideplmanifest "github.com/cloudfoundry/bosh-init/deployment/manifest"
fakebiui "github.com/cloudfoundry/bosh-init/ui/fakes"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
fakesys "github.com/cloudfoundry/bosh-utils/system/fakes"
fakeuuid "github.com/cloudfoundry/bosh-utils/uuid/fakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Manager", func() {
var (
manager Manager
fakeCloud *fakebicloud.FakeCloud
fakeFs *fakesys.FakeFileSystem
fakeUUIDGenerator *fakeuuid.FakeGenerator
diskRepo biconfig.DiskRepo
)
BeforeEach(func() {
logger := boshlog.NewLogger(boshlog.LevelNone)
fakeFs = fakesys.NewFakeFileSystem()
fakeUUIDGenerator = &fakeuuid.FakeGenerator{}
deploymentStateService := biconfig.NewFileSystemDeploymentStateService(fakeFs, fakeUUIDGenerator, logger, "/fake/path")
diskRepo = biconfig.NewDiskRepo(deploymentStateService, fakeUUIDGenerator)
managerFactory := NewManagerFactory(diskRepo, logger)
fakeCloud = fakebicloud.NewFakeCloud()
manager = managerFactory.NewManager(fakeCloud)
fakeUUIDGenerator.GeneratedUUID = "fake-uuid"
})
开发者ID:mattcui,项目名称:bosh-init,代码行数:31,代码来源:manager_test.go
示例2:
fakesys "github.com/cloudfoundry/bosh-init/internal/github.com/cloudfoundry/bosh-utils/system/fakes"
fakeuuid "github.com/cloudfoundry/bosh-init/internal/github.com/cloudfoundry/bosh-utils/uuid/fakes"
. "github.com/cloudfoundry/bosh-init/internal/github.com/onsi/ginkgo"
. "github.com/cloudfoundry/bosh-init/internal/github.com/onsi/gomega"
bistemcell "github.com/cloudfoundry/bosh-init/stemcell"
)
var _ = Describe("Manager", func() {
var (
fakeCloud *fakebicloud.FakeCloud
manager Manager
logger boshlog.Logger
expectedNetworkInterfaces map[string]biproperty.Map
expectedCloudProperties biproperty.Map
expectedEnv biproperty.Map
deploymentManifest bideplmanifest.Manifest
fakeVMRepo *fakebiconfig.FakeVMRepo
stemcellRepo biconfig.StemcellRepo
fakeDiskDeployer *fakebivm.FakeDiskDeployer
fakeAgentClient *fakebiagentclient.FakeAgentClient
stemcell bistemcell.CloudStemcell
fs *fakesys.FakeFileSystem
)
BeforeEach(func() {
logger = boshlog.NewLogger(boshlog.LevelNone)
fs = fakesys.NewFakeFileSystem()
fakeCloud = fakebicloud.NewFakeCloud()
fakeAgentClient = fakebiagentclient.NewFakeAgentClient()
fakeVMRepo = fakebiconfig.NewFakeVMRepo()
开发者ID:vestel,项目名称:bosh-init,代码行数:30,代码来源:manager_test.go
示例3:
fakebicloud "github.com/cloudfoundry/bosh-init/cloud/fakes"
fakebiconfig "github.com/cloudfoundry/bosh-init/config/fakes"
fakebidisk "github.com/cloudfoundry/bosh-init/deployment/disk/fakes"
fakebivm "github.com/cloudfoundry/bosh-init/deployment/vm/fakes"
fakebiagentclient "github.com/cloudfoundry/bosh-init/internal/github.com/cloudfoundry/bosh-agent/agentclient/fakes"
fakebiui "github.com/cloudfoundry/bosh-init/ui/fakes"
)
var _ = Describe("VM", func() {
var (
vm VM
fakeVMRepo *fakebiconfig.FakeVMRepo
fakeStemcellRepo *fakebiconfig.FakeStemcellRepo
fakeDiskDeployer *fakebivm.FakeDiskDeployer
fakeAgentClient *fakebiagentclient.FakeAgentClient
fakeCloud *fakebicloud.FakeCloud
applySpec bias.ApplySpec
diskPool bideplmanifest.DiskPool
fs *fakesys.FakeFileSystem
logger boshlog.Logger
)
BeforeEach(func() {
fakeAgentClient = fakebiagentclient.NewFakeAgentClient()
// apply spec is only being passed to the agent client, so it doesn't need much content for testing
applySpec = bias.ApplySpec{
Deployment: "fake-deployment-name",
}
diskPool = bideplmanifest.DiskPool{
开发者ID:vestel,项目名称:bosh-init,代码行数:31,代码来源:vm_test.go
示例4:
. "github.com/onsi/gomega"
"errors"
bicloud "github.com/cloudfoundry/bosh-init/cloud"
fakebicloud "github.com/cloudfoundry/bosh-init/cloud/fakes"
biconfig "github.com/cloudfoundry/bosh-init/config"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
fakesys "github.com/cloudfoundry/bosh-utils/system/fakes"
fakeuuid "github.com/cloudfoundry/bosh-utils/uuid/fakes"
)
var _ = Describe("CloudStemcell", func() {
var (
stemcellRepo biconfig.StemcellRepo
fakeUUIDGenerator *fakeuuid.FakeGenerator
fakeCloud *fakebicloud.FakeCloud
cloudStemcell CloudStemcell
)
BeforeEach(func() {
stemcellRecord := biconfig.StemcellRecord{
CID: "fake-stemcell-cid",
Name: "fake-stemcell-name",
Version: "fake-stemcell-version",
}
fs := fakesys.NewFakeFileSystem()
logger := boshlog.NewLogger(boshlog.LevelNone)
fakeUUIDGenerator = &fakeuuid.FakeGenerator{}
deploymentStateService := biconfig.NewFileSystemDeploymentStateService(fs, fakeUUIDGenerator, logger, "/fake/path")
stemcellRepo = biconfig.NewStemcellRepo(deploymentStateService, fakeUUIDGenerator)
fakeCloud = fakebicloud.NewFakeCloud()
开发者ID:mattcui,项目名称:bosh-init,代码行数:32,代码来源:cloud_stemcell_test.go
示例5:
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)
开发者ID:mattcui,项目名称:bosh-init,代码行数:31,代码来源:manager_test.go
示例6:
biconfig "github.com/cloudfoundry/bosh-init/config"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
biproperty "github.com/cloudfoundry/bosh-utils/property"
fakesys "github.com/cloudfoundry/bosh-utils/system/fakes"
fakeuuid "github.com/cloudfoundry/bosh-utils/uuid/fakes"
fakebicloud "github.com/cloudfoundry/bosh-init/cloud/fakes"
. "github.com/cloudfoundry/bosh-init/deployment/disk"
)
var _ = Describe("Disk", func() {
var (
disk Disk
diskCloudProperties biproperty.Map
fakeCloud *fakebicloud.FakeCloud
diskRepo biconfig.DiskRepo
fakeUUIDGenerator *fakeuuid.FakeGenerator
)
BeforeEach(func() {
diskCloudProperties = biproperty.Map{
"fake-cloud-property-key": "fake-cloud-property-value",
}
fakeCloud = fakebicloud.NewFakeCloud()
diskRecord := biconfig.DiskRecord{
CID: "fake-disk-cid",
Size: 1024,
CloudProperties: diskCloudProperties,
}
开发者ID:mattcui,项目名称:bosh-init,代码行数:31,代码来源:disk_test.go
注:本文中的github.com/cloudfoundry/bosh-init/cloud/fakes.FakeCloud类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论