本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/api/spacequotas/spacequotasfakes.FakeSpaceQuotaRepository.FindByGUIDReturns方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeSpaceQuotaRepository.FindByGUIDReturns方法的具体用法?Golang FakeSpaceQuotaRepository.FindByGUIDReturns怎么用?Golang FakeSpaceQuotaRepository.FindByGUIDReturns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/cli/cf/api/spacequotas/spacequotasfakes.FakeSpaceQuotaRepository
的用法示例。
在下文中一共展示了FakeSpaceQuotaRepository.FindByGUIDReturns方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
spaceRequirement.GetSpaceReturns(space)
spaceQuota = models.SpaceQuota{
Name: "runaway",
GUID: "runaway-guid",
MemoryLimit: 102400,
InstanceMemoryLimit: -1,
RoutesLimit: 111,
ServicesLimit: 222,
NonBasicServicesAllowed: false,
AppInstanceLimit: 7,
ReservedRoutePortsLimit: "7",
}
quotaRepo.FindByGUIDReturns(spaceQuota, nil)
})
JustBeforeEach(func() {
executeErr = cmd.Execute(flagContext)
})
Context("when logged in and an org is targeted", func() {
BeforeEach(func() {
err := flagContext.Parse("my-space")
Expect(err).NotTo(HaveOccurred())
cmd.Requirements(reqFactory, flagContext)
})
Context("when the guid flag is passed", func() {
BeforeEach(func() {
示例2:
quota := models.SpaceQuota{
Name: "runaway",
GUID: "runaway-guid",
MemoryLimit: 102400,
InstanceMemoryLimit: -1,
RoutesLimit: 111,
ServicesLimit: 222,
NonBasicServicesAllowed: false,
AppInstanceLimit: 7,
}
requirementsFactory.LoginSuccess = true
requirementsFactory.TargetedOrgSuccess = true
requirementsFactory.Space = space
quotaRepo.FindByGUIDReturns(quota, nil)
})
Context("when the guid flag is passed", func() {
It("shows only the space guid", func() {
runCommand("--guid", "whose-space-is-it-anyway")
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"whose-space-is-it-anyway-guid"},
))
Expect(ui.Outputs).ToNot(ContainSubstrings(
[]string{"Getting info for space", "whose-space-is-it-anyway", "my-org", "my-user"},
))
})
})