vagrant-windows-domain 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42f3d186357fa789c5cfe433c9dcb260b30f0d1e
|
4
|
+
data.tar.gz: a0d0b75ed02779afc0c96fc7dd21c5fdcde19cd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0177c73b416054d338634b3abda33249f5c652eee85fbfc365b86d9039421afca652f603e3a0d6d30b89b16116e3ec974dea67c57f53407ecdd9eed3474065db
|
7
|
+
data.tar.gz: 1cd8a084046bc000aee30493c8c28e115810eb64cba17e698c9b6540c7555fcf9ccb3e3b24af5876d2ace64b957495fa60bc713b09eb9859ca6297b1eba4d02c
|
@@ -45,12 +45,12 @@ module VagrantPlugins
|
|
45
45
|
# @param [Config] root_config The default configuration from the Vagrant hierarchy.
|
46
46
|
def configure(root_config)
|
47
47
|
raise WindowsDomainError, :unsupported_platform if !windows?
|
48
|
-
|
49
|
-
verify_guest_capability
|
50
48
|
end
|
51
49
|
|
52
50
|
# Run the Provisioner!
|
53
51
|
def provision
|
52
|
+
verify_guest_capability
|
53
|
+
|
54
54
|
@old_computer_name = get_guest_computer_name(machine)
|
55
55
|
|
56
56
|
@machine.env.ui.say(:info, "Connecting guest machine to domain '#{config.domain}' with computer name '#{config.computer_name}'")
|
@@ -45,12 +45,6 @@ describe VagrantPlugins::WindowsDomain::Provisioner do
|
|
45
45
|
expect { subject.configure(root_config) }.to raise_error("Unsupported platform detected. Vagrant Windows Domain only works on Windows guest environments.")
|
46
46
|
end
|
47
47
|
|
48
|
-
it "should verify the guest has the required powershell cmdlets/capabilities" do
|
49
|
-
expect(communicator).to receive(:sudo).with("which Add-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>nil, :binary=>"Add-Computer"})
|
50
|
-
expect(communicator).to receive(:sudo).with("which Remove-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>nil, :binary=>"Remove-Computer"})
|
51
|
-
subject.configure(root_config)
|
52
|
-
end
|
53
|
-
|
54
48
|
end
|
55
49
|
|
56
50
|
describe "provision" do
|
@@ -64,8 +58,8 @@ describe VagrantPlugins::WindowsDomain::Provisioner do
|
|
64
58
|
allow(shell).to receive(:powershell).with("$env:COMPUTERNAME").and_yield(:stdout, "myoldcomputername")
|
65
59
|
allow(root_config).to receive(:vm).and_return(vm)
|
66
60
|
allow(vm).to receive(:communicator).and_return(:winrm)
|
67
|
-
|
68
|
-
|
61
|
+
allow(communicator).to receive(:sudo).with("which Add-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>"foo.com", :binary=>"Add-Computer"})
|
62
|
+
allow(communicator).to receive(:sudo).with("which Remove-Computer", {:error_class=>VagrantPlugins::WindowsDomain::WindowsDomainError, :error_key=>:binary_not_detected, :domain=>"foo.com", :binary=>"Remove-Computer"})
|
69
63
|
|
70
64
|
root_config.domain = "foo.com"
|
71
65
|
root_config.username = "username"
|
@@ -113,7 +107,6 @@ describe VagrantPlugins::WindowsDomain::Provisioner do
|
|
113
107
|
|
114
108
|
it "join with credentials if provided" do
|
115
109
|
args = subject.generate_command_arguments
|
116
|
-
puts args
|
117
110
|
end
|
118
111
|
|
119
112
|
it "not join with credentials if 'unsecure' option provided" do
|