Merge pull request #7698 from Sharpie/fix-osx-rdp-configuration

Fix RDP connections on OS X
This commit is contained in:
Seth Vargo 2016-08-09 18:20:55 -04:00 committed by GitHub
commit 7fc9a9fdee
2 changed files with 9 additions and 9 deletions

View File

@ -40,12 +40,12 @@ module VagrantPlugins
f.binmode f.binmode
opts.each do |k, v| opts.each do |k, v|
f.write("#{k}:#{v}") f.puts("#{k}:#{v}")
end end
if rdp_info[:extra_args] if rdp_info[:extra_args]
rdp_info[:extra_args].each do |arg| rdp_info[:extra_args].each do |arg|
f.write("#{arg}") f.puts("#{arg}")
end end
end end

View File

@ -13,18 +13,18 @@ describe VagrantPlugins::HostDarwin::Cap::RDP do
it "includes the default options" do it "includes the default options" do
path = described_class.generate_config_file(rdp_info) path = described_class.generate_config_file(rdp_info)
result = File.read(path) result = File.readlines(path).map(&:chomp)
expect(result).to match("drivestoredirect:s:*") expect(result).to include("drivestoredirect:s:*")
expect(result).to match("full address:s:host:port") expect(result).to include("full address:s:host:port")
expect(result).to match("prompt for credentials:i:1") expect(result).to include("prompt for credentials:i:1")
expect(result).to match("username:s:username") expect(result).to include("username:s:username")
end end
it "includes extra RDP arguments" do it "includes extra RDP arguments" do
rdp_info.merge!(extra_args: ["screen mode id:i:0"]) rdp_info.merge!(extra_args: ["screen mode id:i:0"])
path = described_class.generate_config_file(rdp_info) path = described_class.generate_config_file(rdp_info)
result = File.read(path) result = File.readlines(path).map(&:chomp)
expect(result).to match("screen mode id:i:0") expect(result).to include("screen mode id:i:0")
end end
it "opens the RDP file" do it "opens the RDP file" do