Skip to content

Commit

Permalink
Add usage text for update-security-group. Add increased timeout in
Browse files Browse the repository at this point in the history
main test.

[Finishes #74558576]
  • Loading branch information
Devin Fallak and Tim Jarratt authored and tjarratt committed Jul 10, 2014
1 parent ab57ea5 commit 57c77b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion cf/commands/securitygroup/update_security_group.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package securitygroup

import (
"strings"

"github.com/cloudfoundry/cli/cf/api/security_groups"
"github.com/cloudfoundry/cli/cf/command_metadata"
"github.com/cloudfoundry/cli/cf/configuration"
Expand All @@ -25,10 +27,12 @@ func NewUpdateSecurityGroup(ui terminal.UI, configRepo configuration.Reader, sec
}

func (cmd UpdateSecurityGroup) Metadata() command_metadata.CommandMetadata {
primaryUsage := T("CF_NAME update-security-group SECURITY_GROUP PATH_TO_JSON_RULES_FILE")
secondaryUsage := T(" The provided path can be an absolute or relative path to a file.\n It should have a single array with JSON objects inside describing the rules.")
return command_metadata.CommandMetadata{
Name: "update-security-group",
Description: T("Update a security group"),
Usage: T("CF_NAME update-security-group SECURITY_GROUP PATH_TO_JSON_RULES_FILE"),
Usage: strings.Join([]string{primaryUsage, secondaryUsage}, "\n\n"),
}
}

Expand Down
2 changes: 1 addition & 1 deletion integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var _ = Describe("exit codes", func() {
result := Cf("some-command-that-should-never-actually-be-a-real-thing-i-can-use")

Eventually(result, 10).Should(Say("not a registered command"))
Expect(result).Should(Exit(1))
Eventually(result, 10).Should(Exit(1))
})
})

Expand Down

0 comments on commit 57c77b9

Please sign in to comment.