Change default transport back to :plaintext, for backwards compatibility
This commit is contained in:
parent
02f4adc895
commit
2caaf82ae0
|
@ -23,9 +23,9 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
def finalize!
|
||||
@username = "vagrant" if @username == UNSET_VALUE
|
||||
@password = "vagrant" if @password == UNSET_VALUE
|
||||
@transport = :ssl if @transport == UNSET_VALUE
|
||||
@username = "vagrant" if @username == UNSET_VALUE
|
||||
@password = "vagrant" if @password == UNSET_VALUE
|
||||
@transport = :plaintext if @transport == UNSET_VALUE
|
||||
@host = nil if @host == UNSET_VALUE
|
||||
is_ssl = @transport == :ssl
|
||||
@port = (is_ssl ? 5986 : 5985) if @port == UNSET_VALUE
|
||||
|
|
|
@ -52,18 +52,18 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
|
|||
|
||||
describe ".endpoint" do
|
||||
context 'when transport is :ssl' do
|
||||
let(:config) {
|
||||
VagrantPlugins::CommunicatorWinRM::Config.new.tap do |c|
|
||||
c.transport = :ssl
|
||||
c.finalize!
|
||||
end
|
||||
}
|
||||
it "should create winrm endpoint address using https" do
|
||||
expect(subject.send(:endpoint)).to eq("https://localhost:5986/wsman")
|
||||
end
|
||||
end
|
||||
|
||||
context "when transport is :plaintext" do
|
||||
let(:config) {
|
||||
VagrantPlugins::CommunicatorWinRM::Config.new.tap do |c|
|
||||
c.transport = :plaintext
|
||||
c.finalize!
|
||||
end
|
||||
}
|
||||
it "should create winrm endpoint address using http" do
|
||||
expect(subject.send(:endpoint)).to eq("http://localhost:5985/wsman")
|
||||
end
|
||||
|
@ -73,7 +73,7 @@ describe VagrantPlugins::CommunicatorWinRM::WinRMShell do
|
|||
describe ".endpoint_options" do
|
||||
it "should create endpoint options" do
|
||||
expect(subject.send(:endpoint_options)).to eq(
|
||||
{ user: "username", pass: "password", host: "localhost", port: 5986,
|
||||
{ user: "username", pass: "password", host: "localhost", port: 5985,
|
||||
basic_auth_only: true, no_ssl_peer_verification: false })
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue