本文整理汇总了Golang中github.com/cloudfoundry/bosh-init/release/fakes.FakeRelease.ReleasePackages方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeRelease.ReleasePackages方法的具体用法?Golang FakeRelease.ReleasePackages怎么用?Golang FakeRelease.ReleasePackages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/bosh-init/release/fakes.FakeRelease
的用法示例。
在下文中一共展示了FakeRelease.ReleasePackages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: rootDesc
//.........这里部分代码省略.........
})
It("clears the deployment record", func() {
err := command.Run(fakeStage, []string{deploymentManifestPath})
Expect(err).To(HaveOccurred())
Expect(err.Error()).To(ContainSubstring("fake-deploy-error"))
deploymentState, err := setupDeploymentStateService.Load()
Expect(err).ToNot(HaveOccurred())
Expect(deploymentState.CurrentManifestSHA1).To(Equal(""))
Expect(deploymentState.Releases).To(Equal([]biconfig.ReleaseRecord{}))
Expect(deploymentState.CurrentReleaseIDs).To(Equal([]string{}))
})
})
Context("when compiled releases are being used", func() {
var (
otherReleaseTarballPath string
fakeOtherRelease *fakebirel.FakeRelease
expectOtherReleaseExtract *gomock.Call
)
BeforeEach(func() {
otherReleaseTarballPath = "/path/to/other-release.tgz"
fakeFs.WriteFileString(otherReleaseTarballPath, "")
fakeOtherRelease = fakebirel.New("other-release", "1234")
fakeOtherRelease.ReleaseIsCompiled = true
fakeOtherRelease.ReleaseJobs = []bireljob.Job{{Name: "not-cpi"}}
fakeOtherRelease.ReleasePackages = []*bipkg.Package{
{
Stemcell: "ubuntu-trusty/fake-stemcell-version",
},
}
expectOtherReleaseExtract = mockReleaseExtractor.EXPECT().Extract(
otherReleaseTarballPath,
).Return(fakeOtherRelease, nil).AnyTimes()
releaseSetManifest = birelsetmanifest.Manifest{
Releases: []birelmanifest.ReleaseRef{
{
Name: "fake-cpi-release-name",
URL: "file://" + cpiReleaseTarballPath,
},
{
Name: "other-release",
URL: "file://" + otherReleaseTarballPath,
},
},
}
boshDeploymentManifest = bideplmanifest.Manifest{
Name: "fake-deployment-name",
Jobs: []bideplmanifest.Job{
{
Name: "fake-job-name",
Templates: []bideplmanifest.ReleaseJobRef{
{
Release: "other-release",
},
},
},