本文整理汇总了Golang中github.com/cloudfoundry-incubator/receptor/fake_receptor.FakeClient.GetVersionReturns方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeClient.GetVersionReturns方法的具体用法?Golang FakeClient.GetVersionReturns怎么用?Golang FakeClient.GetVersionReturns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry-incubator/receptor/fake_receptor.FakeClient
的用法示例。
在下文中一共展示了FakeClient.GetVersionReturns方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
config.SetTarget(fakeServerHost + ".xip.io:" + fakeServerPort)
versionManager = version.NewVersionManager(fakeReceptorClientCreator, fakeFileSwapper, "")
})
AfterEach(func() {
ltcTempFile.Close()
Expect(os.Remove(ltcTempFile.Name())).To(Succeed())
})
Describe("ServerVersions", func() {
It("should fetch versions from receptor", func() {
fakeReceptorClient.GetVersionReturns(receptor.VersionResponse{
CFRelease: "v219",
CFRoutingRelease: "v220",
DiegoRelease: "v221",
GardenLinuxRelease: "v222",
LatticeRelease: "v223",
LatticeReleaseImage: "v224",
LTC: "v225",
Receptor: "v226",
}, nil)
serverVersions, _ := versionManager.ServerVersions("some-target")
Expect(fakeReceptorClientCreator.CreateReceptorClientCallCount()).To(Equal(1))
Expect(fakeReceptorClientCreator.CreateReceptorClientArgsForCall(0)).To(Equal("some-target"))
Expect(serverVersions).To(Equal(version.ServerVersions{
CFRelease: "v219",
CFRoutingRelease: "v220",
DiegoRelease: "v221",
GardenLinuxRelease: "v222",