Skip to content

Commit 358cf56

Browse files
author
Michael Chinigo
authored
cf revisions no longer reports EXPERIMENTAL notice [v7] (#3060)
* `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 fefe5fd commit 358cf56

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"},
@@ -167,7 +168,7 @@ var ExperimentalHelpCategoryList = []HelpCategory{
167168
{
168169
CategoryName: "EXPERIMENTAL COMMANDS:",
169170
CommandList: [][]string{
170-
{"revisions", "revision", "rollback"},
171+
{"revision"},
171172
},
172173
},
173174
}

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
@@ -35,9 +35,6 @@ func (cmd *RollbackCommand) Setup(config command.Config, ui command.UI) error {
3535
}
3636

3737
func (cmd RollbackCommand) Execute(args []string) error {
38-
cmd.UI.DisplayWarning(command.ExperimentalWarning)
39-
cmd.UI.DisplayNewline()
40-
4138
targetRevision := int(cmd.Version.Value)
4239
err := cmd.SharedActor.CheckTarget(true, true)
4340
if err != nil {

command/v7/rollback_command_test.go

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

85-
It("displays the experimental warning", func() {
86-
Expect(testUI.Err).To(Say("This command is in EXPERIMENTAL stage and may change without notice"))
87-
})
88-
8985
When("checking target fails", func() {
9086
BeforeEach(func() {
9187
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)