本文整理匯總了Golang中github.com/cloudfoundry/cli/cf/actors/fakes.FakeServicePlanActor.UpdateSinglePlanForServiceReturns方法的典型用法代碼示例。如果您正苦於以下問題:Golang FakeServicePlanActor.UpdateSinglePlanForServiceReturns方法的具體用法?Golang FakeServicePlanActor.UpdateSinglePlanForServiceReturns怎麽用?Golang FakeServicePlanActor.UpdateSinglePlanForServiceReturns使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cloudfoundry/cli/cf/actors/fakes.FakeServicePlanActor
的用法示例。
在下文中一共展示了FakeServicePlanActor.UpdateSinglePlanForServiceReturns方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
[]string{"OK"},
))
})
It("prints an error if updating one of the plans fails", func() {
actor.UpdateAllPlansForServiceReturns(true, errors.New("Kaboom!"))
Expect(runCommand([]string{"service"})).To(BeTrue())
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"Kaboom!"},
))
})
Context("The user provides a plan", func() {
It("prints an error if the service does not exist", func() {
actor.UpdateSinglePlanForServiceReturns(actors.All, errors.New("could not find service"))
Expect(runCommand([]string{"-p", "service-plan", "service"})).To(BeTrue())
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"could not find service"},
))
})
It("tells the user if the plan is already private", func() {
actor.UpdateSinglePlanForServiceReturns(actors.None, nil)
Expect(runCommand([]string{"-p", "private-service-plan", "service"})).To(BeTrue())
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"The plan is already inaccessible for all orgs"},
[]string{"OK"},
))