puppet 6.5.0-x86-mingw32 → 6.6.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/puppet/application/agent.rb +16 -5
- data/lib/puppet/application/ssl.rb +2 -0
- data/lib/puppet/provider/package.rb +2 -0
- data/lib/puppet/provider/package/pip.rb +1 -2
- data/lib/puppet/provider/package/puppet_gem.rb +1 -1
- data/lib/puppet/provider/package_targetable.rb +2 -0
- data/lib/puppet/ssl/host.rb +1 -1
- data/lib/puppet/ssl/state_machine.rb +92 -24
- data/lib/puppet/transaction.rb +5 -1
- data/lib/puppet/util/pidlock.rb +3 -2
- data/lib/puppet/util/windows/process.rb +8 -8
- data/lib/puppet/version.rb +1 -1
- data/locales/puppet.pot +68 -60
- data/man/man5/puppet.conf.5 +1 -1
- data/man/man8/puppet.8 +1 -1
- data/spec/unit/application/agent_spec.rb +53 -32
- data/spec/unit/application/ssl_spec.rb +13 -0
- data/spec/unit/configurer_spec.rb +1 -1
- data/spec/unit/provider/package/pip_spec.rb +2 -2
- data/spec/unit/ssl/state_machine_spec.rb +175 -48
- data/spec/unit/util/pidlock_spec.rb +26 -0
- metadata +2 -2
@@ -26,6 +26,18 @@ describe Puppet::Util::Pidlock, if: !Puppet::Util::Platform.jruby? do
|
|
26
26
|
allow(Puppet::Util::Windows::Process).to receive(:get_process_image_name_by_pid).with(@lock.lock_pid).and_return('C:\Program Files\Puppet Labs\Puppet\puppet\bin\ruby.exe')
|
27
27
|
else
|
28
28
|
allow(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', @lock.lock_pid, '-o', 'comm=']).and_return('puppet')
|
29
|
+
allow(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', @lock.lock_pid, '-o', 'args=']).and_return('puppet')
|
30
|
+
end
|
31
|
+
expect(@lock).to be_locked
|
32
|
+
end
|
33
|
+
|
34
|
+
it "should become locked if puppet is a gem" do
|
35
|
+
@lock.lock
|
36
|
+
unless Puppet::Util::Platform.windows?
|
37
|
+
expect(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', @lock.lock_pid, '-o', 'comm=']).and_return('ruby')
|
38
|
+
expect(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', @lock.lock_pid, '-o', 'args=']).and_return('ruby /root/puppet/.bundle/ruby/2.3.0/bin/puppet agent --no-daemonize -v')
|
39
|
+
else
|
40
|
+
allow(Puppet::Util::Windows::Process).to receive(:get_process_image_name_by_pid).with(@lock.lock_pid).and_return('C:\tools\ruby25\bin\ruby.exe')
|
29
41
|
end
|
30
42
|
expect(@lock).to be_locked
|
31
43
|
end
|
@@ -109,6 +121,18 @@ describe Puppet::Util::Pidlock, if: !Puppet::Util::Platform.jruby? do
|
|
109
121
|
allow(Puppet::Util::Windows::Process).to receive(:get_process_image_name_by_pid).with(@lock.lock_pid).and_return('C:\Program Files\Puppet Labs\Puppet\puppet\bin\ruby.exe')
|
110
122
|
else
|
111
123
|
allow(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', @lock.lock_pid, '-o', 'comm=']).and_return('puppet')
|
124
|
+
allow(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', @lock.lock_pid, '-o', 'args=']).and_return('puppet')
|
125
|
+
end
|
126
|
+
expect(@lock).to be_locked
|
127
|
+
end
|
128
|
+
|
129
|
+
it "should return true if locked when puppet as gem" do
|
130
|
+
@lock.lock
|
131
|
+
unless Puppet::Util::Platform.windows?
|
132
|
+
expect(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', @lock.lock_pid, '-o', 'comm=']).and_return('ruby')
|
133
|
+
expect(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', @lock.lock_pid, '-o', 'args=']).and_return('ruby /root/puppet/.bundle/ruby/2.3.0/bin/puppet agent --no-daemonize -v')
|
134
|
+
else
|
135
|
+
allow(Puppet::Util::Windows::Process).to receive(:get_process_image_name_by_pid).with(@lock.lock_pid).and_return('C:\tools\ruby25\bin\ruby.exe')
|
112
136
|
end
|
113
137
|
expect(@lock).to be_locked
|
114
138
|
end
|
@@ -159,6 +183,7 @@ describe Puppet::Util::Pidlock, if: !Puppet::Util::Platform.jruby? do
|
|
159
183
|
allow(Puppet::Util::Windows::Process).to receive(:get_process_image_name_by_pid).with(6789).and_return('C:\Program Files\Puppet Labs\Puppet\puppet\bin\ruby.exe')
|
160
184
|
else
|
161
185
|
allow(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', 6789, '-o', 'comm=']).and_return('puppet')
|
186
|
+
allow(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', 6789, '-o', 'args=']).and_return('puppet')
|
162
187
|
end
|
163
188
|
@lock.lock
|
164
189
|
expect(Puppet::FileSystem.exist?(@lockfile)).to be_truthy
|
@@ -188,6 +213,7 @@ describe Puppet::Util::Pidlock, if: !Puppet::Util::Platform.jruby? do
|
|
188
213
|
allow(Puppet::Util::Windows::Process).to receive(:get_process_image_name_by_pid).with(1234).and_return('C:\Program Files\Puppet Labs\Puppet\puppet\bin\ruby.exe')
|
189
214
|
else
|
190
215
|
allow(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', 1234, '-o', 'comm=']).and_return('puppet')
|
216
|
+
allow(Puppet::Util::Execution).to receive(:execute).with(['ps', '-p', 1234, '-o', 'args=']).and_return('puppet')
|
191
217
|
end
|
192
218
|
# lock the file
|
193
219
|
@lock.lock
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.6.0
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facter
|