Skip to content

Commit

Permalink
Rename flag on rollback (revision => rollback)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisa Burns committed Oct 27, 2020
1 parent a78e718 commit 5bf317e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions command/v7/rollback_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ type RollbackCommand struct {

Force bool `short:"f" description:"Force rollback without confirmation"`
RequiredArgs flag.AppName `positional-args:"yes"`
Version flag.Revision `long:"revision" required:"true" description:"Roll back to the given app revision"`
Version flag.Revision `long:"version" required:"true" description:"Roll back to the specified revision"`
relatedCommands interface{} `related_commands:"revisions"`
usage interface{} `usage:"CF_NAME rollback APP_NAME [--revision REVISION_NUMBER] [-f]"`
usage interface{} `usage:"CF_NAME rollback APP_NAME [--version VERSION] [-f]"`

LogCacheClient sharedaction.LogCacheClient
Stager shared.AppStager
Expand Down
16 changes: 8 additions & 8 deletions integration/v7/isolated/rollback_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ var _ = Describe("rollback command", func() {
Expect(session).To(Say("NAME:"))
Expect(session).To(Say("rollback - Rollback to the specified revision of an app"))
Expect(session).To(Say("USAGE:"))
Expect(session).To(Say(`cf rollback APP_NAME \[--revision REVISION_NUMBER\]`))
Expect(session).To(Say(`cf rollback APP_NAME \[--version VERSION\]`))
Expect(session).To(Say("OPTIONS:"))
Expect(session).To(Say("-f Force rollback without confirmation"))
Expect(session).To(Say("--revision Roll back to the given app revision"))
Expect(session).To(Say("-f Force rollback without confirmation"))
Expect(session).To(Say("--version Roll back to the specified revision"))
Expect(session).To(Say("SEE ALSO:"))
Expect(session).To(Say("revisions"))
})
Expand Down Expand Up @@ -64,7 +64,7 @@ var _ = Describe("rollback command", func() {

Describe("the app does not exist", func() {
It("errors with app not found", func() {
session := helpers.CF("rollback", appName, "--revision", "1")
session := helpers.CF("rollback", appName, "--version", "1")
Eventually(session).Should(Exit(1))

Expect(session).ToNot(Say("Are you sure you want to continue?"))
Expand Down Expand Up @@ -102,7 +102,7 @@ applications:

When("the desired revision does not exist", func() {
It("errors with 'revision not found'", func() {
session := helpers.CF("rollback", appName, "--revision", "5")
session := helpers.CF("rollback", appName, "--version", "5")
Eventually(session).Should(Exit(1))

Expect(session.Err).To(Say("Revision '5' not found"))
Expand All @@ -112,7 +112,7 @@ applications:

When("the -f flag is provided", func() {
It("does not prompt the user, and just rolls back", func() {
session := helpers.CF("rollback", appName, "--revision", "1", "-f")
session := helpers.CF("rollback", appName, "--version", "1", "-f")
Eventually(session).Should(Exit(0))

Expect(session).To(HaveRollbackOutput(appName, orgName, spaceName, userName))
Expand All @@ -136,7 +136,7 @@ applications:
})

It("prompts the user to rollback, then successfully rolls back", func() {
session := helpers.CFWithStdin(buffer, "rollback", appName, "--revision", "1")
session := helpers.CFWithStdin(buffer, "rollback", appName, "--version", "1")
Eventually(session).Should(Exit(0))

Expect(session).To(HaveRollbackPrompt())
Expand All @@ -157,7 +157,7 @@ applications:
})

It("prompts the user to rollback, then does not rollback", func() {
session := helpers.CFWithStdin(buffer, "rollback", appName, "--revision", "1")
session := helpers.CFWithStdin(buffer, "rollback", appName, "--version", "1")
Eventually(session).Should(Exit(0))

Expect(session).To(HaveRollbackPrompt())
Expand Down

0 comments on commit 5bf317e

Please sign in to comment.