diff --git a/command/v7/set_space_role_command.go b/command/v7/set_space_role_command.go index c09143b4da7..f23d45b853b 100644 --- a/command/v7/set_space_role_command.go +++ b/command/v7/set_space_role_command.go @@ -16,7 +16,7 @@ type SetSpaceRoleCommand struct { Args flag.SpaceRoleArgs `positional-args:"yes"` IsClient bool `long:"client" description:"Assign a space role to a client-id of a (non-user) service account"` Origin string `long:"origin" description:"Indicates the identity provider to be used for authentication"` - usage interface{} `usage:"CF_NAME set-space-role USERNAME ORG SPACE ROLE\n CF_NAME set-space-role USERNAME ORG SPACE ROLE [--client]\n CF_NAME set-space-role USERNAME ORG SPACE ROLE [--origin ORIGIN]\n\nROLES:\n SpaceManager - Invite and manage users, and enable features for a given space\n SpaceDeveloper - Create and manage apps and services, and see logs and reports\n SpaceAuditor - View logs, reports, and settings on this space\n SpaceSupporter [Beta role, subject to change] - Manage apps and services, and see logs and reports"` + usage interface{} `usage:"CF_NAME set-space-role USERNAME ORG SPACE ROLE\n CF_NAME set-space-role USERNAME ORG SPACE ROLE [--client]\n CF_NAME set-space-role USERNAME ORG SPACE ROLE [--origin ORIGIN]\n\nROLES:\n SpaceManager - Invite and manage users, and enable features for a given space\n SpaceDeveloper - Create and manage apps and services, and see logs and reports\n SpaceAuditor - View logs, reports, and settings on this space\n SpaceSupporter [Beta role, subject to change] - Manage app lifecycle and service bindings"` relatedCommands interface{} `related_commands:"space-users, unset-space-role"` } diff --git a/command/v7/unset_space_role_command.go b/command/v7/unset_space_role_command.go index 6db3fbd89e7..0bfc040bf58 100644 --- a/command/v7/unset_space_role_command.go +++ b/command/v7/unset_space_role_command.go @@ -11,7 +11,7 @@ type UnsetSpaceRoleCommand struct { Args flag.SpaceRoleArgs `positional-args:"yes"` IsClient bool `long:"client" description:"Remove space role from a client-id of a (non-user) service account"` Origin string `long:"origin" description:"Indicates the identity provider to be used for authentication"` - usage interface{} `usage:"CF_NAME unset-space-role USERNAME ORG SPACE ROLE\n CF_NAME unset-space-role USERNAME ORG SPACE ROLE [--client]\n CF_NAME unset-space-role USERNAME ORG SPACE ROLE [--origin ORIGIN]\n\nROLES:\n SpaceManager - Invite and manage users, and enable features for a given space\n SpaceDeveloper - Create and manage apps and services, and see logs and reports\n SpaceAuditor - View logs, reports, and settings on this space\n SpaceSupporter [Beta role, subject to change] - Manage apps and services, and see logs and reports"` + usage interface{} `usage:"CF_NAME unset-space-role USERNAME ORG SPACE ROLE\n CF_NAME unset-space-role USERNAME ORG SPACE ROLE [--client]\n CF_NAME unset-space-role USERNAME ORG SPACE ROLE [--origin ORIGIN]\n\nROLES:\n SpaceManager - Invite and manage users, and enable features for a given space\n SpaceDeveloper - Create and manage apps and services, and see logs and reports\n SpaceAuditor - View logs, reports, and settings on this space\n SpaceSupporter [Beta role, subject to change] - Manage app lifecycle and service bindings"` relatedCommands interface{} `related_commands:"set-space-role, space-users"` } diff --git a/integration/v7/isolated/set_space_role_command_test.go b/integration/v7/isolated/set_space_role_command_test.go index 8355936d1f9..8cce52ff55f 100644 --- a/integration/v7/isolated/set_space_role_command_test.go +++ b/integration/v7/isolated/set_space_role_command_test.go @@ -13,23 +13,23 @@ var _ = Describe("set-space-role command", func() { When("--help flag is set", func() { It("Displays command usage to output", func() { session := helpers.CF("set-space-role", "--help") - Eventually(session).Should(Say("NAME:")) - Eventually(session).Should(Say("set-space-role - Assign a space role to a user")) - Eventually(session).Should(Say("USAGE:")) - Eventually(session).Should(Say("cf set-space-role USERNAME ORG SPACE ROLE")) - Eventually(session).Should(Say(`cf set-space-role USERNAME ORG SPACE ROLE \[--client\]`)) - Eventually(session).Should(Say(`cf set-space-role USERNAME ORG SPACE ROLE \[--origin ORIGIN\]`)) - Eventually(session).Should(Say("ROLES:")) - Eventually(session).Should(Say("SpaceManager - Invite and manage users, and enable features for a given space")) - Eventually(session).Should(Say("SpaceDeveloper - Create and manage apps and services, and see logs and reports")) - Eventually(session).Should(Say("SpaceAuditor - View logs, reports, and settings on this space")) - Eventually(session).Should(Say("SpaceSupporter - ")) - Eventually(session).Should(Say("OPTIONS:")) - Eventually(session).Should(Say(`--client\s+Assign a space role to a client-id of a \(non-user\) service account`)) - Eventually(session).Should(Say(`--origin\s+Indicates the identity provider to be used for authentication`)) - Eventually(session).Should(Say("SEE ALSO:")) - Eventually(session).Should(Say("space-users, unset-space-role")) Eventually(session).Should(Exit(0)) + Expect(session).To(Say("NAME:")) + Expect(session).To(Say("set-space-role - Assign a space role to a user")) + Expect(session).To(Say("USAGE:")) + Expect(session).To(Say("cf set-space-role USERNAME ORG SPACE ROLE")) + Expect(session).To(Say(`cf set-space-role USERNAME ORG SPACE ROLE \[--client\]`)) + Expect(session).To(Say(`cf set-space-role USERNAME ORG SPACE ROLE \[--origin ORIGIN\]`)) + Expect(session).To(Say("ROLES:")) + Expect(session).To(Say("SpaceManager - Invite and manage users, and enable features for a given space")) + Expect(session).To(Say("SpaceDeveloper - Create and manage apps and services, and see logs and reports")) + Expect(session).To(Say("SpaceAuditor - View logs, reports, and settings on this space")) + Expect(session).To(Say(`SpaceSupporter \[Beta role, subject to change\] - Manage app lifecycle and service bindings`)) + Expect(session).To(Say("OPTIONS:")) + Expect(session).To(Say(`--client\s+Assign a space role to a client-id of a \(non-user\) service account`)) + Expect(session).To(Say(`--origin\s+Indicates the identity provider to be used for authentication`)) + Expect(session).To(Say("SEE ALSO:")) + Expect(session).To(Say("space-users, unset-space-role")) }) }) diff --git a/integration/v7/isolated/unset_space_role_command_test.go b/integration/v7/isolated/unset_space_role_command_test.go index 1d65d709e4f..f6cf0937ced 100644 --- a/integration/v7/isolated/unset_space_role_command_test.go +++ b/integration/v7/isolated/unset_space_role_command_test.go @@ -32,23 +32,23 @@ var _ = Describe("unset-space-role command", func() { When("--help flag is unset", func() { It("Displays command usage to output", func() { session := helpers.CF("unset-space-role", "--help") - Eventually(session).Should(Say("NAME:")) - Eventually(session).Should(Say("unset-space-role - Remove a space role from a user")) - Eventually(session).Should(Say("USAGE:")) - Eventually(session).Should(Say("cf unset-space-role USERNAME ORG SPACE ROLE")) - Eventually(session).Should(Say(`cf unset-space-role USERNAME ORG SPACE ROLE \[--client\]`)) - Eventually(session).Should(Say(`cf unset-space-role USERNAME ORG SPACE ROLE \[--origin ORIGIN\]`)) - Eventually(session).Should(Say("ROLES:")) - Eventually(session).Should(Say("SpaceManager - Invite and manage users, and enable features for a given space")) - Eventually(session).Should(Say("SpaceDeveloper - Create and manage apps and services, and see logs and reports")) - Eventually(session).Should(Say("SpaceAuditor - View logs, reports, and settings on this space")) - Eventually(session).Should(Say("SpaceSupporter -")) - Eventually(session).Should(Say("OPTIONS:")) - Eventually(session).Should(Say(`--client\s+Remove space role from a client-id of a \(non-user\) service account`)) - Eventually(session).Should(Say(`--origin\s+Indicates the identity provider to be used for authentication`)) - Eventually(session).Should(Say("SEE ALSO:")) - Eventually(session).Should(Say("set-space-role, space-users")) Eventually(session).Should(Exit(0)) + Expect(session).To(Say("NAME:")) + Expect(session).To(Say("unset-space-role - Remove a space role from a user")) + Expect(session).To(Say("USAGE:")) + Expect(session).To(Say("cf unset-space-role USERNAME ORG SPACE ROLE")) + Expect(session).To(Say(`cf unset-space-role USERNAME ORG SPACE ROLE \[--client\]`)) + Expect(session).To(Say(`cf unset-space-role USERNAME ORG SPACE ROLE \[--origin ORIGIN\]`)) + Expect(session).To(Say("ROLES:")) + Expect(session).To(Say("SpaceManager - Invite and manage users, and enable features for a given space")) + Expect(session).To(Say("SpaceDeveloper - Create and manage apps and services, and see logs and reports")) + Expect(session).To(Say("SpaceAuditor - View logs, reports, and settings on this space")) + Expect(session).To(Say(`SpaceSupporter \[Beta role, subject to change\] - Manage app lifecycle and service bindings`)) + Expect(session).To(Say("OPTIONS:")) + Expect(session).To(Say(`--client\s+Remove space role from a client-id of a \(non-user\) service account`)) + Expect(session).To(Say(`--origin\s+Indicates the identity provider to be used for authentication`)) + Expect(session).To(Say("SEE ALSO:")) + Expect(session).To(Say("set-space-role, space-users")) }) })