コード例 #1
0
			fakeExitHandler,
			"darwin",
			"/fake/ltc",
			fakeVersionManager)
	})

	Describe("Version Command", func() {
		var versionCommand cli.Command

		BeforeEach(func() {
			versionCommand = commandFactory.MakeVersionCommand()
			fakeVersionManager.ServerVersionsReturns(version.ServerVersions{
				CfRelease:           "v219",
				CfRoutingRelease:    "v220",
				DiegoRelease:        "v221",
				GardenLinuxRelease:  "v222",
				LatticeRelease:      "v223",
				LatticeReleaseImage: "v224",
				Ltc:                 "v225",
				Receptor:            "v226",
			}, nil)
		})

		It("Prints the CLI and API versions", func() {
			test_helpers.ExecuteCommandWithArgs(versionCommand, []string{})

			Expect(outputBuffer).To(test_helpers.SayLine("Client version: 1.8.0"))
			Expect(outputBuffer).To(test_helpers.SayLine("CF release version: v219"))
			Expect(outputBuffer).To(test_helpers.SayLine("CF routing release version: v220"))
			Expect(outputBuffer).To(test_helpers.SayLine("Diego release version: v221"))
			Expect(outputBuffer).To(test_helpers.SayLine("Garden linux release version: v222"))
			Expect(outputBuffer).To(test_helpers.SayLine("Lattice release version: v223"))
コード例 #2
0
			fakeExitHandler,
			"darwin",
			"/fake/ltc",
			fakeVersionManager)
	})

	Describe("Version Command", func() {
		var versionCommand cli.Command

		BeforeEach(func() {
			versionCommand = commandFactory.MakeVersionCommand()
			fakeVersionManager.ServerVersionsReturns(version.ServerVersions{
				CFRelease:           "v219",
				CFRoutingRelease:    "v220",
				DiegoRelease:        "v221",
				GardenLinuxRelease:  "v222",
				LatticeRelease:      "some-server-lattice-sha",
				LatticeReleaseImage: "some-server-lattice-image-sha",
				LTC:                 "v225",
				Receptor:            "v226",
			}, nil)
		})

		It("Prints the CLI and API versions", func() {
			test_helpers.ExecuteCommandWithArgs(versionCommand, []string{})

			Expect(fakeVersionManager.ServerVersionsCallCount()).To(Equal(1))
			Expect(fakeVersionManager.ServerVersionsArgsForCall(0)).To(Equal("http://receptor.lattice.xip.io"))

			Expect(outputBuffer).To(test_helpers.SayLine("Client: some-client-lattice-sha"))
			Expect(outputBuffer).To(test_helpers.SayLine("Server: some-server-lattice-sha"))
			Expect(outputBuffer).To(test_helpers.SayLine("\tImage: some-server-lattice-image-sha"))