Skip to content

Commit

Permalink
list expects no parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
barnybug committed Jul 7, 2016
1 parent be688c2 commit 95698e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/features/validation.feature
Expand Up @@ -56,6 +56,10 @@ Feature: parameter validation
When I execute "cli53 rrpurge a b"
Then the exit code was 1

Scenario: list expects no arguments
When I execute "cli53 list a"
Then the exit code was 1

Scenario: bad usage
When I execute "cli53 --bad list"
Then the exit code was 1
4 changes: 4 additions & 0 deletions main.go
Expand Up @@ -40,6 +40,10 @@ func Main(args []string) int {
Flags: commonFlags,
Action: func(c *cli.Context) error {
r53 = getService(c.Bool("debug"), c.String("profile"))
if len(c.Args()) != 0 {
cli.ShowCommandHelp(c, "list")
return cli.NewExitError("No parameters expected", 1)
}
listZones()
return nil
},
Expand Down

0 comments on commit 95698e6

Please sign in to comment.