本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/api/security_groups/spaces/fakes.FakeSecurityGroupSpaceBinder.BindSpaceArgsForCall方法的典型用法代码示例。如果您正苦于以下问题:Golang FakeSecurityGroupSpaceBinder.BindSpaceArgsForCall方法的具体用法?Golang FakeSecurityGroupSpaceBinder.BindSpaceArgsForCall怎么用?Golang FakeSecurityGroupSpaceBinder.BindSpaceArgsForCall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/cli/cf/api/security_groups/spaces/fakes.FakeSecurityGroupSpaceBinder
的用法示例。
在下文中一共展示了FakeSecurityGroupSpaceBinder.BindSpaceArgsForCall方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
space.Name = "space-name"
space.Guid = "space-guid"
fakeSpaceRepo.FindByNameInOrgSpace = space
securityGroup := models.SecurityGroup{}
securityGroup.Name = "security-group"
securityGroup.Guid = "security-group-guid"
fakeSecurityGroupRepo.ReadReturns(securityGroup, nil)
})
JustBeforeEach(func() {
runCommand("security-group", "org-name", "space-name")
})
It("assigns the security group to the space", func() {
secGroupGuid, spaceGuid := fakeSpaceBinder.BindSpaceArgsForCall(0)
Expect(secGroupGuid).To(Equal("security-group-guid"))
Expect(spaceGuid).To(Equal("space-guid"))
})
It("describes what it is doing for the user's benefit", func() {
Expect(ui.Outputs).To(ContainSubstrings(
[]string{"Assigning security group security-group to space space-name in org org-name as my-user"},
[]string{"OK"},
[]string{"TIP: Changes will not apply to existing running applications until they are restarted."},
))
})
})
})
})