-
Notifications
You must be signed in to change notification settings - Fork 934
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#174503944](https://www.pivotaltracker.com/story/show/174503944) Co-authored-by: Nick Webb <[email protected]> Signed-off-by: Nick Webb <[email protected]> Co-authored-by: Nick Webb <[email protected]>
- Loading branch information
Showing
5 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package v7 | ||
|
||
import ( | ||
"code.cloudfoundry.org/cli/command/flag" | ||
) | ||
|
||
type RevisionCommand struct { | ||
BaseCommand | ||
usage interface{} `usage:"CF_NAME revision APP_NAME [--version VERSION]"` | ||
RequiredArgs flag.AppName `positional-args:"yes"` | ||
Version flag.Revision `long:"version" required:"true" description:"The integer representing the specific revision to show"` | ||
relatedCommands interface{} `related_commands:"revisions, rollback"` | ||
} | ||
|
||
func (cmd RevisionCommand) Execute(_ []string) error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package v7_test | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo" | ||
) | ||
|
||
var _ = Describe("revision Command", func() { | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package isolated | ||
|
||
import ( | ||
. "code.cloudfoundry.org/cli/cf/util/testhelpers/matchers" | ||
"code.cloudfoundry.org/cli/integration/helpers" | ||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
. "github.com/onsi/gomega/gbytes" | ||
. "github.com/onsi/gomega/gexec" | ||
) | ||
|
||
var _ = Describe("revision command", func() { | ||
Describe("help", func() { | ||
When("--help flag is set", func() { | ||
It("appears in cf help -a", func() { | ||
session := helpers.CF("help", "-a") | ||
Eventually(session).Should(Exit(0)) | ||
Expect(session).To(HaveCommandInCategoryWithDescription("revision", "APPS", "Show details for a specific app revision")) | ||
}) | ||
|
||
It("Displays revision command usage to output", func() { | ||
session := helpers.CF("revision", "--help") | ||
|
||
Eventually(session).Should(Exit(0)) | ||
|
||
Expect(session).To(Say("NAME:")) | ||
Expect(session).To(Say("revision - Show details for a specific app revision")) | ||
Expect(session).To(Say("USAGE:")) | ||
Expect(session).To(Say(`cf revision APP_NAME [--version VERSION]`)) | ||
Expect(session).To(Say("OPTIONS:")) | ||
Expect(session).To(Say("--version The integer representing the specific revision to show")) | ||
Expect(session).To(Say("SEE ALSO:")) | ||
Expect(session).To(Say("revisions, rollback")) | ||
}) | ||
}) | ||
}) | ||
}) |