"github.com/cloudfoundry/cli/cf/requirements" "github.com/cloudfoundry/cli/cf/requirements/requirementsfakes" testcmd "github.com/cloudfoundry/cli/testhelpers/commands" testconfig "github.com/cloudfoundry/cli/testhelpers/configuration" testterm "github.com/cloudfoundry/cli/testhelpers/terminal" . "github.com/cloudfoundry/cli/testhelpers/matchers" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("update-service-auth-token command", func() { var ( ui *testterm.FakeUI configRepo coreconfig.Repository authTokenRepo *apifakes.OldFakeAuthTokenRepo requirementsFactory *requirementsfakes.FakeFactory deps commandregistry.Dependency ) updateCommandDependency := func(pluginCall bool) { deps.UI = ui deps.RepoLocator = deps.RepoLocator.SetServiceAuthTokenRepository(authTokenRepo) deps.Config = configRepo commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("update-service-auth-token").SetDependency(deps, pluginCall)) } BeforeEach(func() { ui = &testterm.FakeUI{Inputs: []string{"y"}} authTokenRepo = new(apifakes.OldFakeAuthTokenRepo) configRepo = testconfig.NewRepositoryWithDefaults()
"github.com/cloudfoundry/cli/cf/requirements/requirementsfakes" testcmd "github.com/cloudfoundry/cli/testhelpers/commands" testconfig "github.com/cloudfoundry/cli/testhelpers/configuration" testterm "github.com/cloudfoundry/cli/testhelpers/terminal" "github.com/cloudfoundry/cli/cf/commands/serviceauthtoken" . "github.com/cloudfoundry/cli/testhelpers/matchers" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) var _ = Describe("service-auth-tokens command", func() { var ( ui *testterm.FakeUI configRepo coreconfig.Repository authTokenRepo *apifakes.OldFakeAuthTokenRepo requirementsFactory *requirementsfakes.FakeFactory deps commandregistry.Dependency ) updateCommandDependency := func(pluginCall bool) { deps.UI = ui deps.RepoLocator = deps.RepoLocator.SetServiceAuthTokenRepository(authTokenRepo) deps.Config = configRepo commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("service-auth-tokens").SetDependency(deps, pluginCall)) } BeforeEach(func() { ui = &testterm.FakeUI{Inputs: []string{"y"}} authTokenRepo = new(apifakes.OldFakeAuthTokenRepo) configRepo = testconfig.NewRepositoryWithDefaults()
"github.com/cloudfoundry/cli/cf/requirements/requirementsfakes" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" testcmd "github.com/cloudfoundry/cli/testhelpers/commands" testconfig "github.com/cloudfoundry/cli/testhelpers/configuration" testterm "github.com/cloudfoundry/cli/testhelpers/terminal" . "github.com/cloudfoundry/cli/testhelpers/matchers" ) var _ = Describe("delete-service-auth-token command", func() { var ( ui *testterm.FakeUI configRepo coreconfig.Repository authTokenRepo *apifakes.OldFakeAuthTokenRepo requirementsFactory *requirementsfakes.FakeFactory deps commandregistry.Dependency ) updateCommandDependency := func(pluginCall bool) { deps.UI = ui deps.RepoLocator = deps.RepoLocator.SetServiceAuthTokenRepository(authTokenRepo) deps.Config = configRepo commandregistry.Commands.SetCommand(commandregistry.Commands.FindCommand("delete-service-auth-token").SetDependency(deps, pluginCall)) } BeforeEach(func() { ui = &testterm.FakeUI{Inputs: []string{"y"}} authTokenRepo = new(apifakes.OldFakeAuthTokenRepo) configRepo = testconfig.NewRepositoryWithDefaults()