producer-core/features/ssh/config.feature
Thibault Jouan 85a47df547 Use SSH user name configured for a given target:
When a user is configured for the targeted host name, use it for SSH
authentification instead of the name of current user logged in.

* Modify Remote#user_name to use configured user name.
2013-09-28 20:07:36 +00:00

23 lines
566 B
Gherkin

Feature: SSH settings
Background:
Given a recipe with:
"""
target 'some_host.example'
puts env.remote.user_name
"""
Scenario: uses current user login name as SSH user name by default
When I successfully execute the recipe
Then the output must contain my current login name
Scenario: uses configured SSH user name for a given host
Given an SSH config with:
"""
Host some_host.example
User some_user
"""
When I successfully execute the recipe
Then the output must contain "some_user"