本文整理匯總了Golang中code/cloudfoundry/org/cli/cf/api/securitygroups/securitygroupsfakes.FakeSecurityGroupRepo類的典型用法代碼示例。如果您正苦於以下問題:Golang FakeSecurityGroupRepo類的具體用法?Golang FakeSecurityGroupRepo怎麽用?Golang FakeSecurityGroupRepo使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了FakeSecurityGroupRepo類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
testcmd "code.cloudfoundry.org/cli/testhelpers/commands"
testconfig "code.cloudfoundry.org/cli/testhelpers/configuration"
testterm "code.cloudfoundry.org/cli/testhelpers/terminal"
"code.cloudfoundry.org/cli/cf/commandregistry"
. "code.cloudfoundry.org/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("bind-security-group command", func() {
var (
ui *testterm.FakeUI
configRepo coreconfig.Repository
fakeSecurityGroupRepo *securitygroupsfakes.FakeSecurityGroupRepo
requirementsFactory *requirementsfakes.FakeFactory
fakeSpaceRepo *spacesapifakes.FakeSpaceRepository
fakeOrgRepo *organizationsfakes.FakeOrganizationRepository
fakeSpaceBinder *spacesfakes.FakeSecurityGroupSpaceBinder
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetSpaceRepository(fakeSpaceRepo)
deps.RepoLocator = deps.RepoLocator.SetOrganizationRepository(fakeOrgRepo)
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupRepository(fakeSecurityGroupRepo)
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupSpaceBinder(fakeSpaceBinder)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("bind-security-group").SetDependency(deps, pluginCall))
}
示例2:
"code.cloudfoundry.org/cli/cf/api/securitygroups/spaces/spacesfakes"
spacesapifakes "code.cloudfoundry.org/cli/cf/api/spaces/spacesfakes"
testcmd "code.cloudfoundry.org/cli/testhelpers/commands"
testconfig "code.cloudfoundry.org/cli/testhelpers/configuration"
. "code.cloudfoundry.org/cli/testhelpers/matchers"
testterm "code.cloudfoundry.org/cli/testhelpers/terminal"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("unbind-security-group command", func() {
var (
ui *testterm.FakeUI
securityGroupRepo *securitygroupsfakes.FakeSecurityGroupRepo
orgRepo *organizationsfakes.FakeOrganizationRepository
spaceRepo *spacesapifakes.FakeSpaceRepository
secBinder *spacesfakes.FakeSecurityGroupSpaceBinder
requirementsFactory *requirementsfakes.FakeFactory
configRepo coreconfig.Repository
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetSpaceRepository(spaceRepo)
deps.RepoLocator = deps.RepoLocator.SetOrganizationRepository(orgRepo)
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupRepository(securityGroupRepo)
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupSpaceBinder(secBinder)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("unbind-security-group").SetDependency(deps, pluginCall))
}
示例3:
"code.cloudfoundry.org/cli/cf/requirements"
"code.cloudfoundry.org/cli/cf/requirements/requirementsfakes"
testcmd "code.cloudfoundry.org/cli/testhelpers/commands"
testconfig "code.cloudfoundry.org/cli/testhelpers/configuration"
testterm "code.cloudfoundry.org/cli/testhelpers/terminal"
. "code.cloudfoundry.org/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("create-security-group command", func() {
var (
ui *testterm.FakeUI
securityGroupRepo *securitygroupsfakes.FakeSecurityGroupRepo
requirementsFactory *requirementsfakes.FakeFactory
configRepo coreconfig.Repository
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupRepository(securityGroupRepo)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("create-security-group").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
requirementsFactory = new(requirementsfakes.FakeFactory)
securityGroupRepo = new(securitygroupsfakes.FakeSecurityGroupRepo)
示例4:
"code.cloudfoundry.org/cli/cf/requirements/requirementsfakes"
testcmd "code.cloudfoundry.org/cli/testhelpers/commands"
testconfig "code.cloudfoundry.org/cli/testhelpers/configuration"
testterm "code.cloudfoundry.org/cli/testhelpers/terminal"
"code.cloudfoundry.org/cli/cf/commandregistry"
. "code.cloudfoundry.org/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("bind-running-security-group command", func() {
var (
ui *testterm.FakeUI
configRepo coreconfig.Repository
requirementsFactory *requirementsfakes.FakeFactory
fakeSecurityGroupRepo *securitygroupsfakes.FakeSecurityGroupRepo
fakeRunningSecurityGroupRepo *runningfakes.FakeSecurityGroupsRepo
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupRepository(fakeSecurityGroupRepo)
deps.RepoLocator = deps.RepoLocator.SetRunningSecurityGroupRepository(fakeRunningSecurityGroupRepo)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("bind-running-security-group").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
configRepo = testconfig.NewRepositoryWithDefaults()
示例5:
"code.cloudfoundry.org/cli/cf/requirements"
"code.cloudfoundry.org/cli/cf/requirements/requirementsfakes"
testcmd "code.cloudfoundry.org/cli/testhelpers/commands"
testconfig "code.cloudfoundry.org/cli/testhelpers/configuration"
testterm "code.cloudfoundry.org/cli/testhelpers/terminal"
. "code.cloudfoundry.org/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("unbind-staging-security-group command", func() {
var (
ui *testterm.FakeUI
configRepo coreconfig.Repository
requirementsFactory *requirementsfakes.FakeFactory
fakeSecurityGroupRepo *securitygroupsfakes.FakeSecurityGroupRepo
fakeStagingSecurityGroupsRepo *stagingfakes.FakeSecurityGroupsRepo
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupRepository(fakeSecurityGroupRepo)
deps.RepoLocator = deps.RepoLocator.SetStagingSecurityGroupRepository(fakeStagingSecurityGroupsRepo)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("unbind-staging-security-group").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
configRepo = testconfig.NewRepositoryWithDefaults()
示例6:
"code.cloudfoundry.org/cli/cf/requirements/requirementsfakes"
testcmd "code.cloudfoundry.org/cli/testhelpers/commands"
testconfig "code.cloudfoundry.org/cli/testhelpers/configuration"
testterm "code.cloudfoundry.org/cli/testhelpers/terminal"
"code.cloudfoundry.org/cli/cf/commands/securitygroup"
. "code.cloudfoundry.org/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("list-security-groups command", func() {
var (
ui *testterm.FakeUI
repo *securitygroupsfakes.FakeSecurityGroupRepo
requirementsFactory *requirementsfakes.FakeFactory
configRepo coreconfig.Repository
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupRepository(repo)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("security-groups").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
requirementsFactory = new(requirementsfakes.FakeFactory)
repo = new(securitygroupsfakes.FakeSecurityGroupRepo)
示例7:
"code.cloudfoundry.org/cli/cf/requirements/requirementsfakes"
testcmd "code.cloudfoundry.org/cli/testhelpers/commands"
testconfig "code.cloudfoundry.org/cli/testhelpers/configuration"
testterm "code.cloudfoundry.org/cli/testhelpers/terminal"
"code.cloudfoundry.org/cli/cf/commandregistry"
. "code.cloudfoundry.org/cli/testhelpers/matchers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("security-group command", func() {
var (
ui *testterm.FakeUI
securityGroupRepo *securitygroupsfakes.FakeSecurityGroupRepo
requirementsFactory *requirementsfakes.FakeFactory
configRepo coreconfig.Repository
deps commandregistry.Dependency
)
updateCommandDependency := func(pluginCall bool) {
deps.UI = ui
deps.RepoLocator = deps.RepoLocator.SetSecurityGroupRepository(securityGroupRepo)
deps.Config = configRepo
commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("security-group").SetDependency(deps, pluginCall))
}
BeforeEach(func() {
ui = &testterm.FakeUI{}
requirementsFactory = new(requirementsfakes.FakeFactory)
securityGroupRepo = new(securitygroupsfakes.FakeSecurityGroupRepo)