puppet 6.10.0 → 6.10.1

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.

Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +1 -1
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +18 -18
  5. data/ext/project_data.yaml +2 -2
  6. data/lib/puppet/module_tool/applications/installer.rb +5 -1
  7. data/lib/puppet/module_tool/tar/mini.rb +11 -1
  8. data/lib/puppet/network/uri.rb +18 -0
  9. data/lib/puppet/node/environment.rb +5 -15
  10. data/lib/puppet/pops/validation.rb +11 -19
  11. data/lib/puppet/provider/service/windows.rb +8 -0
  12. data/lib/puppet/type/notify.rb +3 -2
  13. data/lib/puppet/type/service.rb +7 -2
  14. data/lib/puppet/util/windows/service.rb +149 -4
  15. data/lib/puppet/version.rb +1 -1
  16. data/locales/puppet.pot +81 -69
  17. data/man/man5/puppet.conf.5 +2 -2
  18. data/man/man8/puppet-agent.8 +1 -1
  19. data/man/man8/puppet-apply.8 +1 -1
  20. data/man/man8/puppet-catalog.8 +1 -1
  21. data/man/man8/puppet-config.8 +1 -1
  22. data/man/man8/puppet-describe.8 +1 -1
  23. data/man/man8/puppet-device.8 +1 -1
  24. data/man/man8/puppet-doc.8 +1 -1
  25. data/man/man8/puppet-epp.8 +1 -1
  26. data/man/man8/puppet-facts.8 +1 -1
  27. data/man/man8/puppet-filebucket.8 +1 -1
  28. data/man/man8/puppet-generate.8 +1 -1
  29. data/man/man8/puppet-help.8 +1 -1
  30. data/man/man8/puppet-key.8 +1 -1
  31. data/man/man8/puppet-lookup.8 +1 -1
  32. data/man/man8/puppet-man.8 +1 -1
  33. data/man/man8/puppet-module.8 +1 -1
  34. data/man/man8/puppet-node.8 +1 -1
  35. data/man/man8/puppet-parser.8 +1 -1
  36. data/man/man8/puppet-plugin.8 +1 -1
  37. data/man/man8/puppet-report.8 +1 -1
  38. data/man/man8/puppet-resource.8 +1 -1
  39. data/man/man8/puppet-script.8 +1 -1
  40. data/man/man8/puppet-ssl.8 +1 -1
  41. data/man/man8/puppet-status.8 +1 -1
  42. data/man/man8/puppet.8 +2 -2
  43. data/spec/integration/type/notify_spec.rb +46 -0
  44. data/spec/unit/module_tool/tar/mini_spec.rb +1 -1
  45. data/spec/unit/network/http/api/indirected_routes_spec.rb +25 -10
  46. data/spec/unit/network/uri_spec.rb +47 -0
  47. data/spec/unit/provider/service/windows_spec.rb +20 -0
  48. data/spec/unit/type/file/source_spec.rb +4 -4
  49. data/spec/unit/type/schedule_spec.rb +3 -1
  50. data/spec/unit/type/service_spec.rb +16 -0
  51. data/spec/unit/util/windows/service_spec.rb +9 -0
  52. metadata +7 -2
@@ -93,6 +93,13 @@ describe test_title, "when validating attribute values" do
93
93
  expect(srv.should(:enable)).to eq(:manual)
94
94
  end
95
95
 
96
+ it "should support :delayed as a value on Windows" do
97
+ allow(Puppet::Util::Platform).to receive(:windows?).and_return(true)
98
+
99
+ srv = Puppet::Type.type(:service).new(:name => "yay", :enable => :delayed)
100
+ expect(srv.should(:enable)).to eq(:delayed)
101
+ end
102
+
96
103
  it "should not support :manual as a value when not on Windows" do
97
104
  allow(Puppet::Util::Platform).to receive(:windows?).and_return(false)
98
105
 
@@ -101,6 +108,15 @@ describe test_title, "when validating attribute values" do
101
108
  /Setting enable to manual is only supported on Microsoft Windows\./
102
109
  )
103
110
  end
111
+
112
+ it "should not support :delayed as a value when not on Windows" do
113
+ allow(Puppet::Util::Platform).to receive(:windows?).and_return(false)
114
+
115
+ expect { Puppet::Type.type(:service).new(:name => "yay", :enable => :delayed) }.to raise_error(
116
+ Puppet::Error,
117
+ /Setting enable to delayed is only supported on Microsoft Windows\./
118
+ )
119
+ end
104
120
  end
105
121
 
106
122
  describe "the timeout parameter" do
@@ -41,6 +41,10 @@ describe "Puppet::Util::Windows::Service", :if => Puppet.features.microsoft_wind
41
41
  expect(subject::QUERY_SERVICE_CONFIGW).to receive(:new).and_return(query_return)
42
42
  end
43
43
 
44
+ def expect_successful_config_query2_and_return(param, query_return)
45
+ expect(param).to receive(:new).and_return(query_return)
46
+ end
47
+
44
48
  let(:subject) { Puppet::Util::Windows::Service }
45
49
  let(:pointer) { double() }
46
50
  let(:mock_service_name) { double() }
@@ -51,7 +55,9 @@ describe "Puppet::Util::Windows::Service", :if => Puppet.features.microsoft_wind
51
55
  before do
52
56
  allow(subject).to receive(:QueryServiceStatusEx).and_return(1)
53
57
  allow(subject).to receive(:QueryServiceConfigW).and_return(1)
58
+ allow(subject).to receive(:QueryServiceConfig2W).and_return(1)
54
59
  allow(subject).to receive(:ChangeServiceConfigW).and_return(1)
60
+ allow(subject).to receive(:ChangeServiceConfig2W).and_return(1)
55
61
  allow(subject).to receive(:OpenSCManagerW).and_return(scm)
56
62
  allow(subject).to receive(:OpenServiceW).and_return(service)
57
63
  allow(subject).to receive(:CloseServiceHandle)
@@ -577,6 +583,9 @@ describe "Puppet::Util::Windows::Service", :if => Puppet.features.microsoft_wind
577
583
  }.each do |start_type_name, start_type|
578
584
  it "queries the service and returns the service start type #{start_type_name}" do
579
585
  expect_successful_config_query_and_return({:dwStartType => start_type})
586
+ if start_type_name == :SERVICE_AUTO_START
587
+ expect_successful_config_query2_and_return(subject::SERVICE_DELAYED_AUTO_START_INFO, {:fDelayedAutostart => 0})
588
+ end
580
589
  expect(subject.service_start_type(mock_service_name)).to eq(start_type_name)
581
590
  end
582
591
  end
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.10.0
4
+ version: 6.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-30 00:00:00.000000000 Z
11
+ date: 2019-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter
@@ -697,6 +697,7 @@ files:
697
697
  - lib/puppet/network/resolver.rb
698
698
  - lib/puppet/network/rest_controller.rb
699
699
  - lib/puppet/network/rights.rb
700
+ - lib/puppet/network/uri.rb
700
701
  - lib/puppet/node.rb
701
702
  - lib/puppet/node/environment.rb
702
703
  - lib/puppet/node/facts.rb
@@ -1807,6 +1808,7 @@ files:
1807
1808
  - spec/integration/transaction_spec.rb
1808
1809
  - spec/integration/type/exec_spec.rb
1809
1810
  - spec/integration/type/file_spec.rb
1811
+ - spec/integration/type/notify_spec.rb
1810
1812
  - spec/integration/type/package_spec.rb
1811
1813
  - spec/integration/type/tidy_spec.rb
1812
1814
  - spec/integration/type_spec.rb
@@ -2167,6 +2169,7 @@ files:
2167
2169
  - spec/unit/network/http_spec.rb
2168
2170
  - spec/unit/network/resolver_spec.rb
2169
2171
  - spec/unit/network/rights_spec.rb
2172
+ - spec/unit/network/uri_spec.rb
2170
2173
  - spec/unit/node/environment_spec.rb
2171
2174
  - spec/unit/node/facts_spec.rb
2172
2175
  - spec/unit/node_spec.rb
@@ -3050,6 +3053,7 @@ test_files:
3050
3053
  - spec/integration/transaction_spec.rb
3051
3054
  - spec/integration/type/exec_spec.rb
3052
3055
  - spec/integration/type/file_spec.rb
3056
+ - spec/integration/type/notify_spec.rb
3053
3057
  - spec/integration/type/package_spec.rb
3054
3058
  - spec/integration/type/tidy_spec.rb
3055
3059
  - spec/integration/type_spec.rb
@@ -3410,6 +3414,7 @@ test_files:
3410
3414
  - spec/unit/network/http_spec.rb
3411
3415
  - spec/unit/network/resolver_spec.rb
3412
3416
  - spec/unit/network/rights_spec.rb
3417
+ - spec/unit/network/uri_spec.rb
3413
3418
  - spec/unit/node/environment_spec.rb
3414
3419
  - spec/unit/node/facts_spec.rb
3415
3420
  - spec/unit/node_spec.rb