Skip to content

Commit

Permalink
enable tip to restart app after cf ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
wanddynosios authored and a-b committed Jun 15, 2023
1 parent 84dbbce commit 6b5896f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions command/v7/enable_ssh_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,13 @@ func (cmd *EnableSSHCommand) Execute(args []string) error {
cmd.UI.DisplayText("TIP: Ensure ssh is also enabled on the space and global level.")
}

if sshEnabled.Enabled && !appFeature.Enabled {
cmd.UI.DisplayText("TIP: An app restart is required for the change to take effect.")
}

if appFeature.Enabled {
cmd.UI.DisplayText("TIP: An app restart may be required for the change to take effect.")
}

return nil
}
1 change: 1 addition & 0 deletions command/v7/enable_ssh_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ var _ = Describe("enable-ssh Command", func() {
It("shows the app ssh is already enabled", func() {
Expect(testUI.Out).To(Say("ssh support for app 'some-app' is already enabled."))
Expect(testUI.Out).To(Say("OK"))
Expect(testUI.Out).To(Say("TIP: An app restart may be required for the change to take effect."))
})
})

Expand Down
1 change: 1 addition & 0 deletions integration/v7/isolated/enable_ssh_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ var _ = Describe("enable-ssh command", func() {

Eventually(session).Should(Say("ssh support for app '%s' is already enabled.", appName))
Eventually(session).Should(Say("OK"))
Eventually(session).Should(Say("An app restart may be required for the change to take effect."))

session = helpers.CF("curl", fmt.Sprintf("v3/apps/%s/ssh_enabled", helpers.AppGUID(appName)))
Eventually(session).Should(Exit(0))
Expand Down

0 comments on commit 6b5896f

Please sign in to comment.