ssh-config should require root path, not a created environment
This commit is contained in:
parent
c630b028fc
commit
8218395546
|
@ -64,7 +64,7 @@ module Vagrant
|
|||
# Outputs a valid entry for .ssh/config which can be used to connect
|
||||
# to this environment.
|
||||
def ssh_config
|
||||
env.require_persisted_vm
|
||||
env.require_root_path
|
||||
puts TemplateRenderer.render("ssh_config", {
|
||||
:host_key => "vagrant",
|
||||
:ssh_user => env.config.ssh.username,
|
||||
|
|
|
@ -113,6 +113,14 @@ class CommandsTest < Test::Unit::TestCase
|
|||
@ssh = mock("ssh")
|
||||
@ssh.stubs(:port).returns(2197)
|
||||
@env.stubs(:ssh).returns(@ssh)
|
||||
@env.stubs(:require_root_path)
|
||||
|
||||
@commands.stubs(:puts)
|
||||
end
|
||||
|
||||
should "require root path" do
|
||||
@env.expects(:require_root_path).once
|
||||
@commands.ssh_config
|
||||
end
|
||||
|
||||
should "output rendered template" do
|
||||
|
|
Loading…
Reference in New Issue