}) 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", LatticeRelease: "v223", LatticeReleaseImage: "v224", LTC: "v225", Receptor: "v226", })) })
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() Expect(serverVersions).To(Equal(version.ServerVersions{ CfRelease: "v219", CfRoutingRelease: "v220", DiegoRelease: "v221", GardenLinuxRelease: "v222", LatticeRelease: "v223", LatticeReleaseImage: "v224", Ltc: "v225", Receptor: "v226", })) }) Context("when call to receptor fails", func() { It("should return the error", func() { err := errors.New("error")