From a115b7a3501ab73ada4308848247f7db7273ce4b Mon Sep 17 00:00:00 2001 From: Michael Chinigo Date: Mon, 5 Aug 2024 12:57:27 -0400 Subject: [PATCH] Remove negative assertions for revision commands' experimental status --- command/v7/revision_command_test.go | 55 ------------------- command/v7/revisions_command_test.go | 4 -- .../v7/isolated/revision_command_test.go | 2 +- .../v7/isolated/revisions_command_test.go | 2 +- 4 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 command/v7/revision_command_test.go diff --git a/command/v7/revision_command_test.go b/command/v7/revision_command_test.go deleted file mode 100644 index 03d5696e738..00000000000 --- a/command/v7/revision_command_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package v7_test - -import ( - "code.cloudfoundry.org/cli/command/commandfakes" - v7 "code.cloudfoundry.org/cli/command/v7" - "code.cloudfoundry.org/cli/command/v7/v7fakes" - "code.cloudfoundry.org/cli/util/ui" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/gbytes" -) - -var _ = Describe("revision Command", func() { - var ( - cmd v7.RevisionCommand - testUI *ui.UI - fakeConfig *commandfakes.FakeConfig - fakeSharedActor *commandfakes.FakeSharedActor - fakeActor *v7fakes.FakeActor - binaryName string - appName string - - out *Buffer - ) - - BeforeEach(func() { - out = NewBuffer() - testUI = ui.NewTestUI(nil, out, NewBuffer()) - fakeConfig = new(commandfakes.FakeConfig) - fakeSharedActor = new(commandfakes.FakeSharedActor) - fakeActor = new(v7fakes.FakeActor) - - cmd = v7.RevisionCommand{ - BaseCommand: v7.BaseCommand{ - UI: testUI, - Config: fakeConfig, - SharedActor: fakeSharedActor, - Actor: fakeActor, - }, - } - binaryName = "faceman" - fakeConfig.BinaryNameReturns(binaryName) - appName = "some-app" - - cmd.RequiredArgs.AppName = appName - }) - - JustBeforeEach(func() { - Expect(cmd.Execute(nil)).To(Succeed()) - }) - - It("no longer displays the experimental warning", func() { - Expect(testUI.Err).NotTo(Say("This command is in EXPERIMENTAL stage and may change without notice")) - }) -}) diff --git a/command/v7/revisions_command_test.go b/command/v7/revisions_command_test.go index 6fa27f59d90..e389e027945 100644 --- a/command/v7/revisions_command_test.go +++ b/command/v7/revisions_command_test.go @@ -59,10 +59,6 @@ var _ = Describe("revisions Command", func() { executeErr = cmd.Execute(nil) }) - It("no longer displays the experimental warning", func() { - Expect(testUI.Err).NotTo(Say("This command is in EXPERIMENTAL stage and may change without notice")) - }) - When("checking target fails", func() { BeforeEach(func() { fakeSharedActor.CheckTargetReturns(actionerror.NotLoggedInError{BinaryName: binaryName}) diff --git a/integration/v7/isolated/revision_command_test.go b/integration/v7/isolated/revision_command_test.go index 8bd52385be2..d3be95545d7 100644 --- a/integration/v7/isolated/revision_command_test.go +++ b/integration/v7/isolated/revision_command_test.go @@ -15,7 +15,7 @@ var _ = Describe("revision command", func() { It("appears in cf help -a", func() { session := helpers.CF("help", "-a") Eventually(session).Should(Exit(0)) - Expect(session).NotTo(HaveCommandInCategoryWithDescription("revision", "EXPERIMENTAL COMMANDS", "Show details for a specific app revision")) + Expect(session).To(HaveCommandInCategoryWithDescription("revision", "APPS", "Show details for a specific app revision")) }) It("Displays revision command usage to output", func() { diff --git a/integration/v7/isolated/revisions_command_test.go b/integration/v7/isolated/revisions_command_test.go index e8a013b0981..952654b1b7a 100644 --- a/integration/v7/isolated/revisions_command_test.go +++ b/integration/v7/isolated/revisions_command_test.go @@ -33,7 +33,7 @@ var _ = Describe("revisions command", func() { It("appears in cf help -a", func() { session := helpers.CF("help", "-a") Eventually(session).Should(Exit(0)) - Expect(session).NotTo(HaveCommandInCategoryWithDescription("revisions", "EXPERIMENTAL COMMANDS", "List revisions of an app")) + Expect(session).To(HaveCommandInCategoryWithDescription("revisions", "APPS", "List revisions of an app")) }) It("Displays command usage to output", func() {