Expect(outputBuffer).To(test_helpers.SayLine("Error verifying target: Unknown Error"))

				verifyOldTargetStillSet()
				Expect(fakeExitHandler.ExitCalledWith).To(Equal([]int{exit_codes.BadTarget}))
			})
		})

		Context("checking ltc target version", func() {
			BeforeEach(func() {
				fakeTargetVerifier.VerifyTargetReturns(true, true, nil)
				fakeBlobStoreVerifier.VerifyReturns(true, nil)
				fakeVersionManager.LtcVersionReturns("some-version")
			})

			It("should print warning and recommend sync if ltc version does not match server", func() {
				fakeVersionManager.LtcMatchesServerReturns(false, nil)

				test_helpers.ExecuteCommandWithArgs(targetCommand, []string{"target.com"})
				Expect(outputBuffer).To(test_helpers.SayLine("WARNING: local ltc version (some-version) does not match target expected version."))
				Expect(outputBuffer).To(test_helpers.SayLine("Run `ltc sync` to replace your local ltc command-line tool with your target cluster's expected version."))
			})

			It("should print warning and NOT recommend sync if ServerVersions endpoint fails", func() {
				fakeVersionManager.LtcMatchesServerReturns(false, errors.New("whoops"))

				test_helpers.ExecuteCommandWithArgs(targetCommand, []string{"target.com"})
				Expect(outputBuffer).To(test_helpers.SayLine("WARNING: local ltc version (some-version) does not match target expected version."))
				Expect(outputBuffer).NotTo(test_helpers.SayLine("Run `ltc sync` to replace your local ltc command-line tool with your target cluster's expected version."))
			})

			It("should not print an error if ltc version matches server", func() {