puppet 6.10.0-universal-darwin → 6.10.1-universal-darwin

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: universal-darwin
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
@@ -711,6 +711,7 @@ files:
711
711
  - lib/puppet/network/resolver.rb
712
712
  - lib/puppet/network/rest_controller.rb
713
713
  - lib/puppet/network/rights.rb
714
+ - lib/puppet/network/uri.rb
714
715
  - lib/puppet/node.rb
715
716
  - lib/puppet/node/environment.rb
716
717
  - lib/puppet/node/facts.rb
@@ -1821,6 +1822,7 @@ files:
1821
1822
  - spec/integration/transaction_spec.rb
1822
1823
  - spec/integration/type/exec_spec.rb
1823
1824
  - spec/integration/type/file_spec.rb
1825
+ - spec/integration/type/notify_spec.rb
1824
1826
  - spec/integration/type/package_spec.rb
1825
1827
  - spec/integration/type/tidy_spec.rb
1826
1828
  - spec/integration/type_spec.rb
@@ -2181,6 +2183,7 @@ files:
2181
2183
  - spec/unit/network/http_spec.rb
2182
2184
  - spec/unit/network/resolver_spec.rb
2183
2185
  - spec/unit/network/rights_spec.rb
2186
+ - spec/unit/network/uri_spec.rb
2184
2187
  - spec/unit/node/environment_spec.rb
2185
2188
  - spec/unit/node/facts_spec.rb
2186
2189
  - spec/unit/node_spec.rb
@@ -3064,6 +3067,7 @@ test_files:
3064
3067
  - spec/integration/transaction_spec.rb
3065
3068
  - spec/integration/type/exec_spec.rb
3066
3069
  - spec/integration/type/file_spec.rb
3070
+ - spec/integration/type/notify_spec.rb
3067
3071
  - spec/integration/type/package_spec.rb
3068
3072
  - spec/integration/type/tidy_spec.rb
3069
3073
  - spec/integration/type_spec.rb
@@ -3424,6 +3428,7 @@ test_files:
3424
3428
  - spec/unit/network/http_spec.rb
3425
3429
  - spec/unit/network/resolver_spec.rb
3426
3430
  - spec/unit/network/rights_spec.rb
3431
+ - spec/unit/network/uri_spec.rb
3427
3432
  - spec/unit/node/environment_spec.rb
3428
3433
  - spec/unit/node/facts_spec.rb
3429
3434
  - spec/unit/node_spec.rb