本文整理匯總了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",
},
},
},