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
|
# Outputs a valid entry for .ssh/config which can be used to connect
|
||||||
# to this environment.
|
# to this environment.
|
||||||
def ssh_config
|
def ssh_config
|
||||||
env.require_persisted_vm
|
env.require_root_path
|
||||||
puts TemplateRenderer.render("ssh_config", {
|
puts TemplateRenderer.render("ssh_config", {
|
||||||
:host_key => "vagrant",
|
:host_key => "vagrant",
|
||||||
:ssh_user => env.config.ssh.username,
|
:ssh_user => env.config.ssh.username,
|
||||||
|
|
|
@ -113,6 +113,14 @@ class CommandsTest < Test::Unit::TestCase
|
||||||
@ssh = mock("ssh")
|
@ssh = mock("ssh")
|
||||||
@ssh.stubs(:port).returns(2197)
|
@ssh.stubs(:port).returns(2197)
|
||||||
@env.stubs(:ssh).returns(@ssh)
|
@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
|
end
|
||||||
|
|
||||||
should "output rendered template" do
|
should "output rendered template" do
|
||||||
|
|
Loading…
Reference in New Issue