Skip to content

Commit

Permalink
Update help info related to revision command
Browse files Browse the repository at this point in the history
  • Loading branch information
gururajsh committed Dec 17, 2024
1 parent 4fc9cb5 commit 6541055
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 27 deletions.
2 changes: 0 additions & 2 deletions command/common/help_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ func (cmd HelpCommand) displayHelpFooter(cmdInfo map[string]sharedaction.Command
cmd.UI.DisplayNonWrappingTable(sharedaction.AllCommandsIndent, cmd.globalOptionsTableData(), 25)

cmd.UI.DisplayNewline()

cmd.displayCommandGroups(internal.ExperimentalHelpCategoryList, cmdInfo, 34)
}

func (cmd HelpCommand) displayCommonCommands() {
Expand Down
11 changes: 1 addition & 10 deletions command/common/internal/help_all_display.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var HelpCategoryList = []HelpCategory{
{"start", "stop", "restart", "stage-package", "restage", "restart-app-instance"},
{"run-task", "task", "tasks", "terminate-task"},
{"packages", "create-package"},
{"revisions", "rollback"},
{"revision", "revisions", "rollback"},
{"droplets", "set-droplet", "download-droplet"},
{"events", "logs"},
{"env", "set-env", "unset-env"},
Expand Down Expand Up @@ -168,12 +168,3 @@ var HelpCategoryList = []HelpCategory{
},
},
}

var ExperimentalHelpCategoryList = []HelpCategory{
{
CategoryName: "EXPERIMENTAL COMMANDS:",
CommandList: [][]string{
{"revision"},
},
},
}
10 changes: 0 additions & 10 deletions command/common/internal/help_all_display_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,6 @@ var _ = Describe("test help all display", func() {
}
}
}

for _, category := range internal.ExperimentalHelpCategoryList {
for _, row := range category.CommandList {
for _, command := range row {
if command != "" {
fromHelpAllDisplay = append(fromHelpAllDisplay, command)
}
}
}
}
})

It("lists all commands from command list in at least one category", func() {
Expand Down
2 changes: 1 addition & 1 deletion command/v7/revisions_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type RevisionsCommand struct {
usage interface{} `usage:"CF_NAME revisions APP_NAME"`

BaseCommand
relatedCommands interface{} `related_commands:"rollback"`
relatedCommands interface{} `related_commands:"revision, rollback"`
}

func (cmd RevisionsCommand) Execute(_ []string) error {
Expand Down
2 changes: 1 addition & 1 deletion command/v7/rollback_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type RollbackCommand struct {
MaxInFlight *int `long:"max-in-flight" description:"Defines the maximum number of instances that will be actively being rolled back."`
Strategy flag.DeploymentStrategy `long:"strategy" description:"Deployment strategy can be canary or rolling. When not specified, it defaults to rolling."`
Version flag.Revision `long:"version" required:"true" description:"Roll back to the specified revision"`
relatedCommands interface{} `related_commands:"revisions"`
relatedCommands interface{} `related_commands:"revision, revisions"`
usage interface{} `usage:"CF_NAME rollback APP_NAME [--version VERSION] [-f]"`

LogCacheClient sharedaction.LogCacheClient
Expand Down
2 changes: 1 addition & 1 deletion integration/v7/isolated/revision_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,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).To(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() {
Expand Down
2 changes: 1 addition & 1 deletion integration/v7/isolated/revisions_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var _ = Describe("revisions command", func() {
Eventually(session).Should(Say("USAGE:"))
Eventually(session).Should(Say("cf revisions APP_NAME"))
Eventually(session).Should(Say("SEE ALSO:"))
Eventually(session).Should(Say("rollback"))
Eventually(session).Should(Say("revision, rollback"))
Eventually(session).Should(Exit(0))
})
})
Expand Down
2 changes: 1 addition & 1 deletion integration/v7/isolated/rollback_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var _ = Describe("rollback command", func() {
Expect(session).To(Say(`--strategy\s+Deployment strategy can be canary or rolling. When not specified, it defaults to rolling.`))
Expect(session).To(Say(`--version\s+Roll back to the specified revision`))
Expect(session).To(Say("SEE ALSO:"))
Expect(session).To(Say("revisions"))
Expect(session).To(Say("revision, revisions"))
})
})
})
Expand Down

0 comments on commit 6541055

Please sign in to comment.