コード例 #1
0
ファイル: update_service_test.go プロジェクト: fujitsu-cf/cli
					))
				})
			})
			Context("when the plan specified does not exist in the service offering", func() {
				It("returns an error", func() {
					callUpdateService([]string{"-p", "not-a-real-plan", "instance-without-service-offering"})

					Expect(ui.Outputs()).To(ContainSubstrings(
						[]string{"Plan does not exist for the murkydb service"},
						[]string{"FAILED"},
					))
				})
			})
			Context("when there is an error updating the service instance", func() {
				It("returns an error", func() {
					serviceRepo.UpdateServiceInstanceReturns(errors.New("Error updating service instance"))
					callUpdateService([]string{"-p", "flare", "my-service-instance"})

					Expect(ui.Outputs()).To(ContainSubstrings(
						[]string{"Error updating service instance"},
						[]string{"FAILED"},
					))
				})
			})
		})
	})

	Context("when service update is synchronous", func() {
		Context("when the plan flag is passed", func() {
			BeforeEach(func() {
				serviceInstance := models.ServiceInstance{