Skip to content

Commit a5ed00b

Browse files
author
Michael Chinigo
authored
cf revisions no longer reports EXPERIMENTAL notice [main] (#3062)
* `cf revisions` no longer reports EXPERIMENTAL notice * Move `revision` and `revisions` commands into APPS section of help * Remove negative assertions for revision commands' experimental status * Restore "revision" command to experimental status * `cf rollback` no longer reports EXPERIMENTAL status * Remove superfluous newline
1 parent 69f68e5 commit a5ed00b

File tree

7 files changed

+4
-18
lines changed

7 files changed

+4
-18
lines changed

command/common/internal/help_all_display.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var HelpCategoryList = []HelpCategory{
1717
{"start", "stop", "restart", "stage-package", "restage", "restart-app-instance"},
1818
{"run-task", "tasks", "terminate-task"},
1919
{"packages", "create-package"},
20+
{"revisions", "rollback"},
2021
{"droplets", "set-droplet", "download-droplet"},
2122
{"events", "logs"},
2223
{"env", "set-env", "unset-env"},
@@ -172,7 +173,7 @@ var ExperimentalHelpCategoryList = []HelpCategory{
172173
{
173174
CategoryName: "EXPERIMENTAL COMMANDS:",
174175
CommandList: [][]string{
175-
{"revisions", "revision", "rollback"},
176+
{"revision"},
176177
},
177178
},
178179
}

command/v7/revisions_command.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"strconv"
66

77
"code.cloudfoundry.org/cli/actor/v7action"
8-
"code.cloudfoundry.org/cli/command"
98
"code.cloudfoundry.org/cli/command/flag"
109
"code.cloudfoundry.org/cli/resources"
1110
"code.cloudfoundry.org/cli/util/ui"
@@ -26,9 +25,6 @@ type RevisionsCommand struct {
2625
}
2726

2827
func (cmd RevisionsCommand) Execute(_ []string) error {
29-
cmd.UI.DisplayWarning(command.ExperimentalWarning)
30-
cmd.UI.DisplayNewline()
31-
3228
err := cmd.SharedActor.CheckTarget(true, true)
3329
if err != nil {
3430
return err

command/v7/revisions_command_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ var _ = Describe("revisions Command", func() {
5959
executeErr = cmd.Execute(nil)
6060
})
6161

62-
It("displays the experimental warning", func() {
63-
Expect(testUI.Err).To(Say("This command is in EXPERIMENTAL stage and may change without notice"))
64-
})
65-
6662
When("checking target fails", func() {
6763
BeforeEach(func() {
6864
fakeSharedActor.CheckTargetReturns(actionerror.NotLoggedInError{BinaryName: binaryName})

command/v7/rollback_command.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ func (cmd *RollbackCommand) Setup(config command.Config, ui command.UI) error {
3838
}
3939

4040
func (cmd RollbackCommand) Execute(args []string) error {
41-
cmd.UI.DisplayWarning(command.ExperimentalWarning)
42-
cmd.UI.DisplayNewline()
43-
4441
targetRevision := int(cmd.Version.Value)
4542
err := cmd.SharedActor.CheckTarget(true, true)
4643
if err != nil {

command/v7/rollback_command_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@ var _ = Describe("rollback Command", func() {
8585
executeErr = cmd.Execute(nil)
8686
})
8787

88-
It("displays the experimental warning", func() {
89-
Expect(testUI.Err).To(Say("This command is in EXPERIMENTAL stage and may change without notice"))
90-
})
91-
9288
When("checking target fails", func() {
9389
BeforeEach(func() {
9490
fakeSharedActor.CheckTargetReturns(actionerror.NoOrganizationTargetedError{BinaryName: binaryName})

integration/v7/isolated/revisions_command_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var _ = Describe("revisions command", func() {
3333
It("appears in cf help -a", func() {
3434
session := helpers.CF("help", "-a")
3535
Eventually(session).Should(Exit(0))
36-
Expect(session).To(HaveCommandInCategoryWithDescription("revisions", "EXPERIMENTAL COMMANDS", "List revisions of an app"))
36+
Expect(session).To(HaveCommandInCategoryWithDescription("revisions", "APPS", "List revisions of an app"))
3737
})
3838

3939
It("Displays command usage to output", func() {

integration/v7/isolated/rollback_command_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var _ = Describe("rollback command", func() {
2121
It("appears in cf help -a", func() {
2222
session := helpers.CF("help", "-a")
2323
Eventually(session).Should(Exit(0))
24-
Expect(session).To(HaveCommandInCategoryWithDescription("rollback", "EXPERIMENTAL COMMANDS", "Rollback to the specified revision of an app"))
24+
Expect(session).To(HaveCommandInCategoryWithDescription("rollback", "APPS", "Rollback to the specified revision of an app"))
2525
})
2626

2727
It("Displays rollback command usage to output", func() {

0 commit comments

Comments
 (0)