facter 2.0.2-universal-darwin → 2.1.0-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 facter might be problematic. Click here for more details.

Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +14 -0
  3. data/ext/project_data.yaml +9 -6
  4. data/lib/facter/core/execution/base.rb +3 -3
  5. data/lib/facter/core/suitable.rb +1 -5
  6. data/lib/facter/dhcp_servers.rb +39 -0
  7. data/lib/facter/ec2.rb +33 -26
  8. data/lib/facter/ec2/rest.rb +130 -0
  9. data/lib/facter/fqdn.rb +2 -0
  10. data/lib/facter/gce.rb +16 -0
  11. data/lib/facter/gce/metadata.rb +87 -0
  12. data/lib/facter/kernelmajversion.rb +8 -0
  13. data/lib/facter/kernelrelease.rb +8 -0
  14. data/lib/facter/memory.rb +21 -15
  15. data/lib/facter/netmask.rb +1 -1
  16. data/lib/facter/operatingsystem.rb +20 -0
  17. data/lib/facter/operatingsystemmajrelease.rb +2 -1
  18. data/lib/facter/operatingsystemrelease.rb +19 -0
  19. data/lib/facter/osfamily.rb +3 -1
  20. data/lib/facter/partitions.rb +35 -0
  21. data/lib/facter/physicalprocessorcount.rb +9 -0
  22. data/lib/facter/processor.rb +25 -25
  23. data/lib/facter/util/config.rb +3 -1
  24. data/lib/facter/util/dhcp_servers.rb +43 -0
  25. data/lib/facter/util/ec2.rb +5 -0
  26. data/lib/facter/util/formatter.rb +2 -1
  27. data/lib/facter/util/ip.rb +1 -1
  28. data/lib/facter/util/loader.rb +10 -1
  29. data/lib/facter/util/manufacturer.rb +15 -16
  30. data/lib/facter/util/memory.rb +12 -12
  31. data/lib/facter/util/netmask.rb +1 -1
  32. data/lib/facter/util/operatingsystem.rb +21 -0
  33. data/lib/facter/util/partitions.rb +41 -0
  34. data/lib/facter/util/partitions/linux.rb +65 -0
  35. data/lib/facter/util/posix.rb +16 -0
  36. data/lib/facter/util/processor.rb +8 -10
  37. data/lib/facter/util/resolution.rb +4 -0
  38. data/lib/facter/util/values.rb +29 -0
  39. data/lib/facter/util/virtual.rb +32 -3
  40. data/lib/facter/util/windows_root.rb +2 -32
  41. data/lib/facter/version.rb +1 -1
  42. data/lib/facter/virtual.rb +53 -12
  43. data/spec/fixtures/ifconfig/openbsd_bridge_rules +11 -0
  44. data/spec/fixtures/unit/dhcp_servers/nmcli_devices +4 -0
  45. data/spec/fixtures/unit/dhcp_servers/nmcli_devices_disconnected +4 -0
  46. data/spec/fixtures/unit/dhcp_servers/nmcli_eth0_dhcp +36 -0
  47. data/spec/fixtures/unit/dhcp_servers/nmcli_eth0_static +24 -0
  48. data/spec/fixtures/unit/dhcp_servers/nmcli_wlan0_dhcp +49 -0
  49. data/spec/fixtures/unit/dhcp_servers/nmcli_wlan0_static +37 -0
  50. data/spec/fixtures/unit/dhcp_servers/route +3 -0
  51. data/spec/fixtures/unit/dhcp_servers/route_nogw +1 -0
  52. data/spec/fixtures/unit/ec2/rest/meta-data/root +20 -0
  53. data/spec/fixtures/unit/gce/metadata/metadata.json +69 -0
  54. data/spec/fixtures/unit/kernelrelease/openbsd-5.3 +2 -0
  55. data/spec/fixtures/unit/kernelrelease/openbsd-5.3-current +3 -0
  56. data/spec/fixtures/unit/memory/aix-svmon +9 -0
  57. data/spec/fixtures/unit/memory/aix-swap_l +2 -0
  58. data/spec/fixtures/unit/memory/darwin-swapinfo-multiple +3 -0
  59. data/spec/fixtures/unit/memory/darwin-swapinfo-single +2 -0
  60. data/spec/fixtures/unit/memory/darwin-vm_stat +13 -0
  61. data/spec/fixtures/unit/memory/dragonfly-vmstat +3 -0
  62. data/spec/fixtures/unit/memory/freebsd-vmstat +3 -0
  63. data/spec/fixtures/unit/memory/linux-proc_meminfo +10 -0
  64. data/spec/fixtures/unit/memory/openbsd-vmstat +3 -0
  65. data/spec/fixtures/unit/memory/smartos_zone_swap_l-single +2 -0
  66. data/spec/fixtures/unit/memory/solaris-prtconf +4 -0
  67. data/spec/fixtures/unit/memory/solaris-swap_l-multiple +3 -0
  68. data/spec/fixtures/unit/memory/solaris-swap_l-single +2 -0
  69. data/spec/fixtures/unit/memory/solaris-vmstat +3 -0
  70. data/spec/fixtures/unit/netmask/ifconfig_aix_7.txt +3 -0
  71. data/spec/fixtures/unit/util/dhcp_servers/route +3 -0
  72. data/spec/fixtures/unit/util/dhcp_servers/route_nogw +1 -0
  73. data/spec/fixtures/unit/util/manufacturer/smartos_smbios +533 -0
  74. data/spec/fixtures/unit/util/operatingsystem/cumuluslinux.txt +8 -0
  75. data/spec/fixtures/unit/util/operatingsystem/redhat-7.txt +12 -0
  76. data/spec/fixtures/unit/util/operatingsystem/sabayon.txt +7 -0
  77. data/spec/fixtures/unit/util/operatingsystem/wheezy.txt +9 -0
  78. data/spec/fixtures/unit/util/partitions/partitions/mount +9 -0
  79. data/spec/fixtures/virtual/proc_1_cgroup/in_a_container +9 -0
  80. data/spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container +8 -0
  81. data/spec/fixtures/virtual/proc_1_cgroup/not_in_a_container +9 -0
  82. data/spec/spec_helper.rb +1 -1
  83. data/spec/unit/core/execution/base_spec.rb +3 -5
  84. data/spec/unit/core/execution/posix_spec.rb +2 -2
  85. data/spec/unit/core/suitable_spec.rb +10 -0
  86. data/spec/unit/dhcp_servers_spec.rb +152 -0
  87. data/spec/unit/ec2/rest_spec.rb +145 -0
  88. data/spec/unit/ec2_spec.rb +87 -147
  89. data/spec/unit/fqdn_spec.rb +16 -0
  90. data/spec/unit/gce/metadata_spec.rb +49 -0
  91. data/spec/unit/gce_spec.rb +34 -0
  92. data/spec/unit/interfaces_spec.rb +9 -9
  93. data/spec/unit/kernelmajversion_spec.rb +14 -9
  94. data/spec/unit/kernelrelease_spec.rb +16 -0
  95. data/spec/unit/macaddress_spec.rb +12 -0
  96. data/spec/unit/memory_spec.rb +53 -122
  97. data/spec/unit/netmask_spec.rb +11 -0
  98. data/spec/unit/operatingsystem_spec.rb +19 -0
  99. data/spec/unit/operatingsystemmajrelease_spec.rb +1 -1
  100. data/spec/unit/operatingsystemrelease_spec.rb +8 -0
  101. data/spec/unit/osfamily_spec.rb +62 -0
  102. data/spec/unit/partitions_spec.rb +48 -0
  103. data/spec/unit/physicalprocessorcount_spec.rb +9 -0
  104. data/spec/unit/processor_spec.rb +15 -7
  105. data/spec/unit/util/config_spec.rb +13 -0
  106. data/spec/unit/util/dhcp_servers_spec.rb +63 -0
  107. data/spec/unit/util/ec2_spec.rb +4 -0
  108. data/spec/unit/util/formatter_spec.rb +50 -0
  109. data/spec/unit/util/loader_spec.rb +4 -4
  110. data/spec/unit/util/macosx_spec.rb +3 -2
  111. data/spec/unit/util/manufacturer_spec.rb +44 -0
  112. data/spec/unit/util/operatingsystem_spec.rb +92 -0
  113. data/spec/unit/util/partitions/partitions_spec.rb +67 -0
  114. data/spec/unit/util/partitions_spec.rb +19 -0
  115. data/spec/unit/util/posix_spec.rb +11 -0
  116. data/spec/unit/util/values_spec.rb +40 -0
  117. data/spec/unit/util/virtual_spec.rb +72 -2
  118. data/spec/unit/virtual_spec.rb +67 -18
  119. metadata +116 -4
  120. data/spec/fixtures/unit/util/loader/nosuchfact.rb +0 -1
@@ -0,0 +1,67 @@
1
+ require 'spec_helper'
2
+ require 'facter'
3
+ require 'facter/util/partitions/linux'
4
+
5
+ describe 'Facter::Util::Partitions::Linux' do
6
+ describe 'on Linux OS' do
7
+ before :each do
8
+ Facter.fact(:kernel).stubs(:value).returns("Linux")
9
+
10
+ File.stubs(:exist?).with('/sys/block/').returns(true)
11
+ File.stubs(:exist?).with("/sys/block/./device").returns(false)
12
+ File.stubs(:exist?).with("/sys/block/../device").returns(false)
13
+ File.stubs(:exist?).with('/dev/disk/by-uuid/').returns(true)
14
+
15
+ devices = [".", "..", "sda", "sdb", "sdc"]
16
+ Dir.stubs(:entries).with('/sys/block/').returns(devices)
17
+
18
+ Facter::Core::Execution.stubs(:which).with('mount').returns(true)
19
+ Facter::Core::Execution.stubs(:which).with('blkid').returns(true)
20
+
21
+ test_parts = {
22
+ 'sda1' => '13459663-22cc-47b4-a9e6-21dea9906e03',
23
+ 'sdb2' => '98043570-eb10-457f-9718-0b85a26e66bf',
24
+ 'sdc3' => 'a35fb506-e831-4752-9899-dff6c601214b',
25
+ }
26
+
27
+ Dir.stubs(:entries).with('/dev/disk/by-uuid/').returns(test_parts.values)
28
+ test_parts.each do |part,uuid|
29
+ device = part.match(/(\D+)/)[1]
30
+ File.stubs(:exist?).with("/sys/block/#{device}/device").returns(true)
31
+ File.stubs(:symlink?).with("/dev/disk/by-uuid/#{uuid}").returns(true)
32
+ File.stubs(:readlink).with("/dev/disk/by-uuid/#{uuid}").returns("/dev/#{part}")
33
+ Dir.stubs(:glob).with("/sys/block/#{device}/#{device}*").returns(["/sys/block/#{device}/#{part}"])
34
+ Facter::Util::Partitions::Linux.stubs(:read_size).returns('12345')
35
+ Facter::Core::Execution.stubs(:exec).with("blkid /dev/#{part}").returns("/dev/#{part}: UUID=\"#{uuid}\" TYPE=\"ext4\"")
36
+ end
37
+
38
+ Facter::Core::Execution.stubs(:exec).with('mount').returns(my_fixture_read("mount"))
39
+ end
40
+
41
+ it '.list should return a list of partitions' do
42
+ Facter::Util::Partitions::Linux.list.should == ['sda1', 'sdb2', 'sdc3']
43
+ end
44
+
45
+ it '.uuid should return a string containing the uuid' do
46
+ Facter::Util::Partitions::Linux.uuid('sda1').should == '13459663-22cc-47b4-a9e6-21dea9906e03'
47
+ Facter::Util::Partitions::Linux.uuid('sdb2').should == '98043570-eb10-457f-9718-0b85a26e66bf'
48
+ Facter::Util::Partitions::Linux.uuid('sdc3').should == 'a35fb506-e831-4752-9899-dff6c601214b'
49
+ end
50
+
51
+ it '.size should return a string containing the size' do
52
+ Facter::Util::Partitions::Linux.size('sda1').should == '12345'
53
+ end
54
+
55
+ it '.mount should return a string containing the mount point of the partition' do
56
+ Facter::Util::Partitions::Linux.mount('sda1').should == '/home'
57
+ Facter::Util::Partitions::Linux.mount('sdb2').should == '/'
58
+ Facter::Util::Partitions::Linux.mount('sdc3').should == '/var'
59
+ end
60
+
61
+ it '.filesystem should return a string containing the filesystem on the partition' do
62
+ Facter::Util::Partitions::Linux.filesystem('sda1').should == 'ext4'
63
+ Facter::Util::Partitions::Linux.filesystem('sdb2').should == 'ext4'
64
+ Facter::Util::Partitions::Linux.filesystem('sdc3').should == 'ext4'
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+ require 'facter'
3
+ require 'facter/util/partitions'
4
+
5
+ describe 'Facter::Util::Partitions' do
6
+ describe 'on unsupported OSs' do
7
+ before :each do
8
+ Facter.fact(:kernel).stubs(:value).returns("SunOS")
9
+ end
10
+
11
+ it 'list should return empty array' do
12
+ Facter::Util::Partitions.list.should == []
13
+ end
14
+
15
+ it 'available? should return false' do
16
+ Facter::Util::Partitions.available?.should == false
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+ require 'facter/util/posix'
3
+
4
+ describe Facter::Util::POSIX do
5
+ describe "retrieving values via sysctl" do
6
+ it "returns the result of the sysctl command" do
7
+ Facter::Util::Resolution.expects(:exec).with("sysctl -n hw.pagesize 2>/dev/null").returns("somevalue")
8
+ expect(described_class.sysctl("hw.pagesize")).to eq "somevalue"
9
+ end
10
+ end
11
+ end
@@ -128,4 +128,44 @@ describe Facter::Util::Values do
128
128
  end
129
129
  end
130
130
  end
131
+
132
+ describe "flatten_structure" do
133
+ it "converts a string to a hash containing that string" do
134
+ input = "foo"
135
+ output = described_class.flatten_structure("path", input)
136
+ expect(output).to eq({"path" => "foo"})
137
+ end
138
+
139
+ it "converts an array to a hash with the array elements with indexes" do
140
+ input = ["foo"]
141
+ output = described_class.flatten_structure("path", input)
142
+ expect(output).to eq({"path_0" => "foo"})
143
+ end
144
+
145
+ it "prefixes a non-nested hash with the given path" do
146
+ input = {"foo" => "bar"}
147
+ output = described_class.flatten_structure("path", input)
148
+ expect(output).to eq({"path_foo" => "bar"})
149
+ end
150
+
151
+ it "flattens elements till it reaches the first non-flattenable structure" do
152
+ input = {
153
+ "first" => "second",
154
+ "arr" => ["zero", "one"],
155
+ "nested_array" => [
156
+ "hash" => "string",
157
+ ],
158
+ "top" => {"middle" => ['bottom']},
159
+ }
160
+ output = described_class.flatten_structure("path", input)
161
+
162
+ expect(output).to eq({
163
+ "path_first" => "second",
164
+ "path_arr_0" => "zero",
165
+ "path_arr_1" => "one",
166
+ "path_nested_array_0_hash" => "string",
167
+ "path_top_middle_0" => "bottom"
168
+ })
169
+ end
170
+ end
131
171
  end
@@ -127,6 +127,16 @@ describe Facter::Util::Virtual do
127
127
  Facter::Util::Virtual.should_not be_ovirt
128
128
  end
129
129
 
130
+ it "detects GCE if the DMI product name is Google" do
131
+ File.stubs(:read).with("/sys/devices/virtual/dmi/id/product_name").returns("Google")
132
+ expect(Facter::Util::Virtual.gce?).to be_true
133
+ end
134
+
135
+ it "does not detect GCE if the DMI product name is not Google" do
136
+ File.stubs(:read).with("/sys/devices/virtual/dmi/id/product_name").returns('')
137
+ expect(Facter::Util::Virtual.gce?).to be_false
138
+ end
139
+
130
140
  fixture_path = fixtures('virtual', 'proc_self_status')
131
141
 
132
142
  test_cases = [
@@ -202,14 +212,14 @@ describe Facter::Util::Virtual do
202
212
  it "should detect kvm on FreeBSD" do
203
213
  FileTest.stubs(:exists?).with("/proc/cpuinfo").returns(false)
204
214
  Facter.fact(:kernel).stubs(:value).returns("FreeBSD")
205
- Facter::Core::Execution.stubs(:exec).with("/sbin/sysctl -n hw.model").returns("QEMU Virtual CPU version 0.12.4")
215
+ Facter::Util::POSIX.stubs(:sysctl).with("hw.model").returns("QEMU Virtual CPU version 0.12.4")
206
216
  Facter::Util::Virtual.should be_kvm
207
217
  end
208
218
 
209
219
  it "should detect kvm on OpenBSD" do
210
220
  FileTest.stubs(:exists?).with("/proc/cpuinfo").returns(false)
211
221
  Facter.fact(:kernel).stubs(:value).returns("OpenBSD")
212
- Facter::Core::Execution.stubs(:exec).with("/sbin/sysctl -n hw.model").returns('QEMU Virtual CPU version (cpu64-rhel6) ("AuthenticAMD" 686-class, 512KB L2 cache)')
222
+ Facter::Util::POSIX.stubs(:sysctl).with("hw.model").returns('QEMU Virtual CPU version (cpu64-rhel6) ("AuthenticAMD" 686-class, 512KB L2 cache)')
213
223
  Facter::Util::Virtual.should be_kvm
214
224
  end
215
225
 
@@ -291,4 +301,64 @@ describe Facter::Util::Virtual do
291
301
  context "on windows" do
292
302
  it_should_behave_like "virt-what", "windows", 'c:\windows\system32\virt-what', "NUL"
293
303
  end
304
+
305
+ describe '.lxc?' do
306
+ subject do
307
+ Facter::Util::Virtual.lxc?
308
+ end
309
+
310
+ fixture_path = fixtures('virtual', 'proc_1_cgroup')
311
+
312
+ context '/proc/1/cgroup has at least one hierarchy rooted in /lxc/' do
313
+ before :each do
314
+ fakepath = Pathname.new(File.join(fixture_path, 'in_a_container'))
315
+ Pathname.stubs(:new).with('/proc/1/cgroup').returns(fakepath)
316
+ end
317
+
318
+ it 'is true' do
319
+ subject.should be_true
320
+ end
321
+ end
322
+
323
+ context '/proc/1/cgroup has no hierarchies rooted in /lxc/' do
324
+ before :each do
325
+ fakepath = Pathname.new(File.join(fixture_path, 'not_in_a_container'))
326
+ Pathname.stubs(:new).with('/proc/1/cgroup').returns(fakepath)
327
+ end
328
+
329
+ it 'is false' do
330
+ subject.should be_false
331
+ end
332
+ end
333
+ end
334
+
335
+ describe '.docker?' do
336
+ subject do
337
+ Facter::Util::Virtual.docker?
338
+ end
339
+
340
+ fixture_path = fixtures('virtual', 'proc_1_cgroup')
341
+
342
+ context '/proc/1/cgroup has at least one hierarchy rooted in /docker/' do
343
+ before :each do
344
+ fakepath = Pathname.new(File.join(fixture_path, 'in_a_docker_container'))
345
+ Pathname.stubs(:new).with('/proc/1/cgroup').returns(fakepath)
346
+ end
347
+
348
+ it 'is true' do
349
+ subject.should be_true
350
+ end
351
+ end
352
+
353
+ context '/proc/1/cgroup has no hierarchies rooted in /docker/' do
354
+ before :each do
355
+ fakepath = Pathname.new(File.join(fixture_path, 'not_in_a_container'))
356
+ Pathname.stubs(:new).with('/proc/1/cgroup').returns(fakepath)
357
+ end
358
+
359
+ it 'is false' do
360
+ subject.should be_false
361
+ end
362
+ end
363
+ end
294
364
  end
@@ -2,10 +2,12 @@
2
2
 
3
3
  require 'spec_helper'
4
4
  require 'facter/util/virtual'
5
- require 'facter/util/macosx'
5
+ require 'facter/util/macosx' unless Facter::Util::Config.is_windows?
6
6
 
7
7
  describe "Virtual fact" do
8
8
  before(:each) do
9
+ Facter::Util::Virtual.stubs(:docker?).returns(false)
10
+ Facter::Util::Virtual.stubs(:lxc?).returns(false)
9
11
  Facter::Util::Virtual.stubs(:zone?).returns(false)
10
12
  Facter::Util::Virtual.stubs(:openvz?).returns(false)
11
13
  Facter::Util::Virtual.stubs(:vserver?).returns(false)
@@ -16,6 +18,7 @@ describe "Virtual fact" do
16
18
  Facter::Util::Virtual.stubs(:virt_what).returns(nil)
17
19
  Facter::Util::Virtual.stubs(:rhev?).returns(false)
18
20
  Facter::Util::Virtual.stubs(:ovirt?).returns(false)
21
+ Facter::Util::Virtual.stubs(:gce?).returns(false)
19
22
  Facter::Util::Virtual.stubs(:virtualbox?).returns(false)
20
23
  end
21
24
 
@@ -47,28 +50,23 @@ describe "Virtual fact" do
47
50
  Facter.fact(:virtual).value.should == "zlinux"
48
51
  end
49
52
 
50
- describe "on Darwin" do
53
+ describe "on Darwin", :unless => Facter::Util::Config.is_windows? do
51
54
  before do
52
55
  Facter.fact(:kernel).stubs(:value).returns("Darwin")
53
56
  end
54
57
 
55
- it "should be parallels with Parallels vendor id" do
56
- Facter::Util::Macosx.stubs(:profiler_data).returns({ "spdisplays_vendor-id" => "0x1ab8" })
58
+ it "should be parallels with Parallels ethernet vendor id" do
59
+ Facter::Util::Macosx.stubs(:profiler_data).returns({ "spethernet_subsystem-vendor-id" => "0x1ab8" })
57
60
  Facter.fact(:virtual).value.should == "parallels"
58
61
  end
59
62
 
60
- it "should be parallels with Parallels vendor name" do
61
- Facter::Util::Macosx.stubs(:profiler_data).returns({ "spdisplays_vendor" => "Parallels" })
62
- Facter.fact(:virtual).value.should == "parallels"
63
- end
64
-
65
- it "should be vmware with VMWare vendor id" do
66
- Facter::Util::Macosx.stubs(:profiler_data).returns({ "spdisplays_vendor-id" => "0x15ad" })
67
- Facter.fact(:virtual).value.should == "vmware"
63
+ it "should be virtualbox with VirtualBox boot rom name" do
64
+ Facter::Util::Macosx.stubs(:profiler_data).returns({ "boot_rom_version" => "VirtualBox" })
65
+ Facter.fact(:virtual).value.should == "virtualbox"
68
66
  end
69
67
 
70
- it "should be vmware with VMWare vendor name" do
71
- Facter::Util::Macosx.stubs(:profiler_data).returns({ "spdisplays_vendor" => "VMWare" })
68
+ it "should be vmware with VMware machine model" do
69
+ Facter::Util::Macosx.stubs(:profiler_data).returns({ "machine_model" => "VMware7,1" })
72
70
  Facter.fact(:virtual).value.should == "vmware"
73
71
  end
74
72
  end
@@ -164,6 +162,12 @@ describe "Virtual fact" do
164
162
  Facter.fact(:virtual).value.should == "ovirt"
165
163
  end
166
164
 
165
+ it "is gce based on DMI info" do
166
+ Facter.fact(:kernel).stubs(:value).returns("Linux")
167
+ Facter::Util::Virtual.stubs(:gce?).returns(true)
168
+ Facter.fact(:virtual).value.should == "gce"
169
+ end
170
+
167
171
  it "should be hyperv with Microsoft vendor name from lspci 2>/dev/null" do
168
172
  Facter::Core::Execution.stubs(:exec).with('lspci 2>/dev/null').returns("00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA")
169
173
  Facter.fact(:virtual).value.should == "hyperv"
@@ -175,6 +179,28 @@ describe "Virtual fact" do
175
179
  Facter.fact(:virtual).value.should == "hyperv"
176
180
  end
177
181
 
182
+ context "In a Linux Container (LXC)" do
183
+ before :each do
184
+ Facter.fact(:kernel).stubs(:value).returns("Linux")
185
+ end
186
+
187
+ it 'is "lxc" when Facter::Util::Virtual.lxc? is true' do
188
+ Facter::Util::Virtual.stubs(:lxc?).returns(true)
189
+ Facter.fact(:virtual).value.should == 'lxc'
190
+ end
191
+ end
192
+
193
+ context "In a Docker Container (docker)" do
194
+ before :each do
195
+ Facter.fact(:kernel).stubs(:value).returns("Linux")
196
+ end
197
+
198
+ it 'is "docker" when Facter::Util::Virtual.docker? is true' do
199
+ Facter::Util::Virtual.stubs(:docker?).returns(true)
200
+ Facter.fact(:virtual).value.should == 'docker'
201
+ end
202
+ end
203
+
178
204
  context "In Google Compute Engine" do
179
205
  before :each do
180
206
  Facter.fact(:kernel).stubs(:value).returns("Linux")
@@ -254,24 +280,29 @@ describe "Virtual fact" do
254
280
  end
255
281
 
256
282
  it "should be parallels with Parallels product name from sysctl" do
257
- Facter::Core::Execution.stubs(:exec).with('sysctl -n hw.product 2>/dev/null').returns("Parallels Virtual Platform")
283
+ Facter::Util::POSIX.stubs(:sysctl).with('hw.product').returns("Parallels Virtual Platform")
258
284
  Facter.fact(:virtual).value.should == "parallels"
259
285
  end
260
286
 
261
287
  it "should be vmware with VMware product name from sysctl" do
262
- Facter::Core::Execution.stubs(:exec).with('sysctl -n hw.product 2>/dev/null').returns("VMware Virtual Platform")
288
+ Facter::Util::POSIX.stubs(:sysctl).with('hw.product').returns("VMware Virtual Platform")
263
289
  Facter.fact(:virtual).value.should == "vmware"
264
290
  end
265
291
 
266
292
  it "should be virtualbox with VirtualBox product name from sysctl" do
267
- Facter::Core::Execution.stubs(:exec).with('sysctl -n hw.product 2>/dev/null').returns("VirtualBox")
293
+ Facter::Util::POSIX.stubs(:sysctl).with('hw.product').returns("VirtualBox")
268
294
  Facter.fact(:virtual).value.should == "virtualbox"
269
295
  end
270
296
 
271
297
  it "should be xenhvm with Xen HVM product name from sysctl" do
272
- Facter::Core::Execution.stubs(:exec).with('sysctl -n hw.product 2>/dev/null').returns("HVM domU")
298
+ Facter::Util::POSIX.stubs(:sysctl).with('hw.product').returns("HVM domU")
273
299
  Facter.fact(:virtual).value.should == "xenhvm"
274
300
  end
301
+
302
+ it "should be ovirt with oVirt Node product name from sysctl" do
303
+ Facter::Util::POSIX.stubs(:sysctl).with('hw.product').returns("oVirt Node")
304
+ Facter.fact(:virtual).value.should == "ovirt"
305
+ end
275
306
  end
276
307
 
277
308
  describe "on Windows" do
@@ -467,4 +498,22 @@ describe "is_virtual fact" do
467
498
  Facter.fact(:virtual).stubs(:value).returns("ovirt")
468
499
  Facter.fact(:is_virtual).value.should == "true"
469
500
  end
501
+
502
+ it "should be true when running on ovirt" do
503
+ Facter.fact(:kernel).stubs(:value).returns("Linux")
504
+ Facter.fact(:virtual).stubs(:value).returns("gce")
505
+ Facter.fact(:is_virtual).value.should == "true"
506
+ end
507
+
508
+ it "should be true when running in LXC" do
509
+ Facter.fact(:kernel).stubs(:value).returns("Linux")
510
+ Facter.fact(:virtual).stubs(:value).returns("lxc")
511
+ Facter.fact(:is_virtual).value.should == "true"
512
+ end
513
+
514
+ it "should be true when running in docker" do
515
+ Facter.fact(:kernel).stubs(:value).returns("Linux")
516
+ Facter.fact(:virtual).stubs(:value).returns("docker")
517
+ Facter.fact(:is_virtual).value.should == "true"
518
+ end
470
519
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
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: 2014-06-06 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: CFPropertyList
@@ -74,11 +74,15 @@ files:
74
74
  - lib/facter/core/logging.rb
75
75
  - lib/facter/core/resolvable.rb
76
76
  - lib/facter/core/suitable.rb
77
+ - lib/facter/dhcp_servers.rb
77
78
  - lib/facter/domain.rb
78
79
  - lib/facter/ec2.rb
80
+ - lib/facter/ec2/rest.rb
79
81
  - lib/facter/facterversion.rb
80
82
  - lib/facter/filesystems.rb
81
83
  - lib/facter/fqdn.rb
84
+ - lib/facter/gce.rb
85
+ - lib/facter/gce/metadata.rb
82
86
  - lib/facter/hardwareisa.rb
83
87
  - lib/facter/hardwaremodel.rb
84
88
  - lib/facter/hostname.rb
@@ -108,6 +112,7 @@ files:
108
112
  - lib/facter/operatingsystemmajrelease.rb
109
113
  - lib/facter/operatingsystemrelease.rb
110
114
  - lib/facter/osfamily.rb
115
+ - lib/facter/partitions.rb
111
116
  - lib/facter/path.rb
112
117
  - lib/facter/physicalprocessorcount.rb
113
118
  - lib/facter/processor.rb
@@ -128,6 +133,7 @@ files:
128
133
  - lib/facter/util/composite_loader.rb
129
134
  - lib/facter/util/config.rb
130
135
  - lib/facter/util/confine.rb
136
+ - lib/facter/util/dhcp_servers.rb
131
137
  - lib/facter/util/directory_loader.rb
132
138
  - lib/facter/util/ec2.rb
133
139
  - lib/facter/util/fact.rb
@@ -143,10 +149,14 @@ files:
143
149
  - lib/facter/util/netmask.rb
144
150
  - lib/facter/util/normalization.rb
145
151
  - lib/facter/util/nothing_loader.rb
152
+ - lib/facter/util/operatingsystem.rb
146
153
  - lib/facter/util/parser.rb
154
+ - lib/facter/util/partitions.rb
155
+ - lib/facter/util/partitions/linux.rb
147
156
  - lib/facter/util/plist.rb
148
157
  - lib/facter/util/plist/generator.rb
149
158
  - lib/facter/util/plist/parser.rb
159
+ - lib/facter/util/posix.rb
150
160
  - lib/facter/util/processor.rb
151
161
  - lib/facter/util/registry.rb
152
162
  - lib/facter/util/resolution.rb
@@ -212,6 +222,7 @@ files:
212
222
  - spec/fixtures/ifconfig/linux_ifconfig_venet
213
223
  - spec/fixtures/ifconfig/open_solaris_10
214
224
  - spec/fixtures/ifconfig/open_solaris_b132
225
+ - spec/fixtures/ifconfig/openbsd_bridge_rules
215
226
  - spec/fixtures/ifconfig/sunos_ifconfig_all_with_multiple_interfaces
216
227
  - spec/fixtures/ifconfig/ubuntu_7_04
217
228
  - spec/fixtures/ifconfig/ubuntu_7_04_eth0
@@ -228,7 +239,17 @@ files:
228
239
  - spec/fixtures/processorcount/solaris-psrinfo
229
240
  - spec/fixtures/processorcount/solaris-sparc-kstat-cpu-info
230
241
  - spec/fixtures/processorcount/solaris-x86_64-kstat-cpu-info
242
+ - spec/fixtures/unit/dhcp_servers/nmcli_devices
243
+ - spec/fixtures/unit/dhcp_servers/nmcli_devices_disconnected
244
+ - spec/fixtures/unit/dhcp_servers/nmcli_eth0_dhcp
245
+ - spec/fixtures/unit/dhcp_servers/nmcli_eth0_static
246
+ - spec/fixtures/unit/dhcp_servers/nmcli_wlan0_dhcp
247
+ - spec/fixtures/unit/dhcp_servers/nmcli_wlan0_static
248
+ - spec/fixtures/unit/dhcp_servers/route
249
+ - spec/fixtures/unit/dhcp_servers/route_nogw
250
+ - spec/fixtures/unit/ec2/rest/meta-data/root
231
251
  - spec/fixtures/unit/filesystems/linux
252
+ - spec/fixtures/unit/gce/metadata/metadata.json
232
253
  - spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt
233
254
  - spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt.em1
234
255
  - spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt.lo
@@ -236,10 +257,29 @@ files:
236
257
  - spec/fixtures/unit/ipaddress/ifconfig_net_tools_1.60.txt
237
258
  - spec/fixtures/unit/ipaddress/ifconfig_non_english_locale.txt
238
259
  - spec/fixtures/unit/ipaddress/ifconfig_ubuntu_1204.txt
260
+ - spec/fixtures/unit/kernelrelease/openbsd-5.3
261
+ - spec/fixtures/unit/kernelrelease/openbsd-5.3-current
262
+ - spec/fixtures/unit/memory/aix-svmon
263
+ - spec/fixtures/unit/memory/aix-swap_l
264
+ - spec/fixtures/unit/memory/darwin-swapinfo-multiple
265
+ - spec/fixtures/unit/memory/darwin-swapinfo-single
266
+ - spec/fixtures/unit/memory/darwin-vm_stat
267
+ - spec/fixtures/unit/memory/dragonfly-vmstat
268
+ - spec/fixtures/unit/memory/freebsd-vmstat
269
+ - spec/fixtures/unit/memory/linux-proc_meminfo
270
+ - spec/fixtures/unit/memory/openbsd-vmstat
271
+ - spec/fixtures/unit/memory/smartos_zone_swap_l-single
272
+ - spec/fixtures/unit/memory/solaris-prtconf
273
+ - spec/fixtures/unit/memory/solaris-swap_l-multiple
274
+ - spec/fixtures/unit/memory/solaris-swap_l-single
275
+ - spec/fixtures/unit/memory/solaris-vmstat
239
276
  - spec/fixtures/unit/netmask/darwin_10_8_5.txt
277
+ - spec/fixtures/unit/netmask/ifconfig_aix_7.txt
240
278
  - spec/fixtures/unit/netmask/ifconfig_net_tools_1.60.txt
241
279
  - spec/fixtures/unit/netmask/ifconfig_ubuntu_1204.txt
242
280
  - spec/fixtures/unit/selinux/selinux_sestatus
281
+ - spec/fixtures/unit/util/dhcp_servers/route
282
+ - spec/fixtures/unit/util/dhcp_servers/route_nogw
243
283
  - spec/fixtures/unit/util/ec2/centos-arp-ec2.out
244
284
  - spec/fixtures/unit/util/ec2/linux-arp-ec2.out
245
285
  - spec/fixtures/unit/util/ec2/linux-arp-not-ec2.out
@@ -283,13 +323,18 @@ files:
283
323
  - spec/fixtures/unit/util/ip/windows_netsh_all_interfaces
284
324
  - spec/fixtures/unit/util/ip/windows_netsh_single_interface
285
325
  - spec/fixtures/unit/util/ip/windows_netsh_single_interface6
286
- - spec/fixtures/unit/util/loader/nosuchfact.rb
287
326
  - spec/fixtures/unit/util/manufacturer/freebsd_dmidecode
288
327
  - spec/fixtures/unit/util/manufacturer/intel_linux_dmidecode
289
328
  - spec/fixtures/unit/util/manufacturer/linux_dmidecode_with_spaces
290
329
  - spec/fixtures/unit/util/manufacturer/opensolaris_smbios
330
+ - spec/fixtures/unit/util/manufacturer/smartos_smbios
291
331
  - spec/fixtures/unit/util/manufacturer/solaris_sunfire_v120_prtdiag
292
332
  - spec/fixtures/unit/util/manufacturer/solaris_t5220_prtdiag
333
+ - spec/fixtures/unit/util/operatingsystem/cumuluslinux.txt
334
+ - spec/fixtures/unit/util/operatingsystem/redhat-7.txt
335
+ - spec/fixtures/unit/util/operatingsystem/sabayon.txt
336
+ - spec/fixtures/unit/util/operatingsystem/wheezy.txt
337
+ - spec/fixtures/unit/util/partitions/partitions/mount
293
338
  - spec/fixtures/unit/util/processor/solaris-i86pc
294
339
  - spec/fixtures/unit/util/processor/solaris-sun4u
295
340
  - spec/fixtures/unit/util/processor/x86-pentium2
@@ -313,6 +358,9 @@ files:
313
358
  - spec/fixtures/unit/zpool_version/linux-fuse_0.6.9
314
359
  - spec/fixtures/unit/zpool_version/solaris_10
315
360
  - spec/fixtures/unit/zpool_version/solaris_11
361
+ - spec/fixtures/virtual/proc_1_cgroup/in_a_container
362
+ - spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container
363
+ - spec/fixtures/virtual/proc_1_cgroup/not_in_a_container
316
364
  - spec/fixtures/virtual/proc_self_status/vserver_2_1/guest
317
365
  - spec/fixtures/virtual/proc_self_status/vserver_2_1/host
318
366
  - spec/fixtures/virtual/proc_self_status/vserver_2_3/guest
@@ -340,10 +388,15 @@ files:
340
388
  - spec/unit/core/logging_spec.rb
341
389
  - spec/unit/core/resolvable_spec.rb
342
390
  - spec/unit/core/suitable_spec.rb
391
+ - spec/unit/dhcp_servers_spec.rb
343
392
  - spec/unit/domain_spec.rb
393
+ - spec/unit/ec2/rest_spec.rb
344
394
  - spec/unit/ec2_spec.rb
345
395
  - spec/unit/facter_spec.rb
346
396
  - spec/unit/filesystems_spec.rb
397
+ - spec/unit/fqdn_spec.rb
398
+ - spec/unit/gce/metadata_spec.rb
399
+ - spec/unit/gce_spec.rb
347
400
  - spec/unit/hardwareisa_spec.rb
348
401
  - spec/unit/hardwaremodel_spec.rb
349
402
  - spec/unit/hostname_spec.rb
@@ -369,6 +422,8 @@ files:
369
422
  - spec/unit/operatingsystem_spec.rb
370
423
  - spec/unit/operatingsystemmajrelease_spec.rb
371
424
  - spec/unit/operatingsystemrelease_spec.rb
425
+ - spec/unit/osfamily_spec.rb
426
+ - spec/unit/partitions_spec.rb
372
427
  - spec/unit/physicalprocessorcount_spec.rb
373
428
  - spec/unit/processor_spec.rb
374
429
  - spec/unit/ps_spec.rb
@@ -379,10 +434,12 @@ files:
379
434
  - spec/unit/util/collection_spec.rb
380
435
  - spec/unit/util/config_spec.rb
381
436
  - spec/unit/util/confine_spec.rb
437
+ - spec/unit/util/dhcp_servers_spec.rb
382
438
  - spec/unit/util/directory_loader_spec.rb
383
439
  - spec/unit/util/ec2_spec.rb
384
440
  - spec/unit/util/fact_spec.rb
385
441
  - spec/unit/util/file_read_spec.rb
442
+ - spec/unit/util/formatter_spec.rb
386
443
  - spec/unit/util/ip/windows_spec.rb
387
444
  - spec/unit/util/ip_spec.rb
388
445
  - spec/unit/util/loader_spec.rb
@@ -390,7 +447,11 @@ files:
390
447
  - spec/unit/util/macosx_spec.rb
391
448
  - spec/unit/util/manufacturer_spec.rb
392
449
  - spec/unit/util/normalization_spec.rb
450
+ - spec/unit/util/operatingsystem_spec.rb
393
451
  - spec/unit/util/parser_spec.rb
452
+ - spec/unit/util/partitions/partitions_spec.rb
453
+ - spec/unit/util/partitions_spec.rb
454
+ - spec/unit/util/posix_spec.rb
394
455
  - spec/unit/util/processor_spec.rb
395
456
  - spec/unit/util/registry_spec.rb
396
457
  - spec/unit/util/resolution_spec.rb
@@ -477,6 +538,7 @@ test_files:
477
538
  - spec/fixtures/ifconfig/linux_ifconfig_venet
478
539
  - spec/fixtures/ifconfig/open_solaris_10
479
540
  - spec/fixtures/ifconfig/open_solaris_b132
541
+ - spec/fixtures/ifconfig/openbsd_bridge_rules
480
542
  - spec/fixtures/ifconfig/sunos_ifconfig_all_with_multiple_interfaces
481
543
  - spec/fixtures/ifconfig/ubuntu_7_04
482
544
  - spec/fixtures/ifconfig/ubuntu_7_04_eth0
@@ -493,7 +555,17 @@ test_files:
493
555
  - spec/fixtures/processorcount/solaris-psrinfo
494
556
  - spec/fixtures/processorcount/solaris-sparc-kstat-cpu-info
495
557
  - spec/fixtures/processorcount/solaris-x86_64-kstat-cpu-info
558
+ - spec/fixtures/unit/dhcp_servers/nmcli_devices
559
+ - spec/fixtures/unit/dhcp_servers/nmcli_devices_disconnected
560
+ - spec/fixtures/unit/dhcp_servers/nmcli_eth0_dhcp
561
+ - spec/fixtures/unit/dhcp_servers/nmcli_eth0_static
562
+ - spec/fixtures/unit/dhcp_servers/nmcli_wlan0_dhcp
563
+ - spec/fixtures/unit/dhcp_servers/nmcli_wlan0_static
564
+ - spec/fixtures/unit/dhcp_servers/route
565
+ - spec/fixtures/unit/dhcp_servers/route_nogw
566
+ - spec/fixtures/unit/ec2/rest/meta-data/root
496
567
  - spec/fixtures/unit/filesystems/linux
568
+ - spec/fixtures/unit/gce/metadata/metadata.json
497
569
  - spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt
498
570
  - spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt.em1
499
571
  - spec/fixtures/unit/interfaces/ifconfig_net_tools_1.60.txt.lo
@@ -501,10 +573,29 @@ test_files:
501
573
  - spec/fixtures/unit/ipaddress/ifconfig_net_tools_1.60.txt
502
574
  - spec/fixtures/unit/ipaddress/ifconfig_non_english_locale.txt
503
575
  - spec/fixtures/unit/ipaddress/ifconfig_ubuntu_1204.txt
576
+ - spec/fixtures/unit/kernelrelease/openbsd-5.3
577
+ - spec/fixtures/unit/kernelrelease/openbsd-5.3-current
578
+ - spec/fixtures/unit/memory/aix-svmon
579
+ - spec/fixtures/unit/memory/aix-swap_l
580
+ - spec/fixtures/unit/memory/darwin-swapinfo-multiple
581
+ - spec/fixtures/unit/memory/darwin-swapinfo-single
582
+ - spec/fixtures/unit/memory/darwin-vm_stat
583
+ - spec/fixtures/unit/memory/dragonfly-vmstat
584
+ - spec/fixtures/unit/memory/freebsd-vmstat
585
+ - spec/fixtures/unit/memory/linux-proc_meminfo
586
+ - spec/fixtures/unit/memory/openbsd-vmstat
587
+ - spec/fixtures/unit/memory/smartos_zone_swap_l-single
588
+ - spec/fixtures/unit/memory/solaris-prtconf
589
+ - spec/fixtures/unit/memory/solaris-swap_l-multiple
590
+ - spec/fixtures/unit/memory/solaris-swap_l-single
591
+ - spec/fixtures/unit/memory/solaris-vmstat
504
592
  - spec/fixtures/unit/netmask/darwin_10_8_5.txt
593
+ - spec/fixtures/unit/netmask/ifconfig_aix_7.txt
505
594
  - spec/fixtures/unit/netmask/ifconfig_net_tools_1.60.txt
506
595
  - spec/fixtures/unit/netmask/ifconfig_ubuntu_1204.txt
507
596
  - spec/fixtures/unit/selinux/selinux_sestatus
597
+ - spec/fixtures/unit/util/dhcp_servers/route
598
+ - spec/fixtures/unit/util/dhcp_servers/route_nogw
508
599
  - spec/fixtures/unit/util/ec2/centos-arp-ec2.out
509
600
  - spec/fixtures/unit/util/ec2/linux-arp-ec2.out
510
601
  - spec/fixtures/unit/util/ec2/linux-arp-not-ec2.out
@@ -548,13 +639,18 @@ test_files:
548
639
  - spec/fixtures/unit/util/ip/windows_netsh_all_interfaces
549
640
  - spec/fixtures/unit/util/ip/windows_netsh_single_interface
550
641
  - spec/fixtures/unit/util/ip/windows_netsh_single_interface6
551
- - spec/fixtures/unit/util/loader/nosuchfact.rb
552
642
  - spec/fixtures/unit/util/manufacturer/freebsd_dmidecode
553
643
  - spec/fixtures/unit/util/manufacturer/intel_linux_dmidecode
554
644
  - spec/fixtures/unit/util/manufacturer/linux_dmidecode_with_spaces
555
645
  - spec/fixtures/unit/util/manufacturer/opensolaris_smbios
646
+ - spec/fixtures/unit/util/manufacturer/smartos_smbios
556
647
  - spec/fixtures/unit/util/manufacturer/solaris_sunfire_v120_prtdiag
557
648
  - spec/fixtures/unit/util/manufacturer/solaris_t5220_prtdiag
649
+ - spec/fixtures/unit/util/operatingsystem/cumuluslinux.txt
650
+ - spec/fixtures/unit/util/operatingsystem/redhat-7.txt
651
+ - spec/fixtures/unit/util/operatingsystem/sabayon.txt
652
+ - spec/fixtures/unit/util/operatingsystem/wheezy.txt
653
+ - spec/fixtures/unit/util/partitions/partitions/mount
558
654
  - spec/fixtures/unit/util/processor/solaris-i86pc
559
655
  - spec/fixtures/unit/util/processor/solaris-sun4u
560
656
  - spec/fixtures/unit/util/processor/x86-pentium2
@@ -578,6 +674,9 @@ test_files:
578
674
  - spec/fixtures/unit/zpool_version/linux-fuse_0.6.9
579
675
  - spec/fixtures/unit/zpool_version/solaris_10
580
676
  - spec/fixtures/unit/zpool_version/solaris_11
677
+ - spec/fixtures/virtual/proc_1_cgroup/in_a_container
678
+ - spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container
679
+ - spec/fixtures/virtual/proc_1_cgroup/not_in_a_container
581
680
  - spec/fixtures/virtual/proc_self_status/vserver_2_1/guest
582
681
  - spec/fixtures/virtual/proc_self_status/vserver_2_1/host
583
682
  - spec/fixtures/virtual/proc_self_status/vserver_2_3/guest
@@ -605,10 +704,15 @@ test_files:
605
704
  - spec/unit/core/logging_spec.rb
606
705
  - spec/unit/core/resolvable_spec.rb
607
706
  - spec/unit/core/suitable_spec.rb
707
+ - spec/unit/dhcp_servers_spec.rb
608
708
  - spec/unit/domain_spec.rb
709
+ - spec/unit/ec2/rest_spec.rb
609
710
  - spec/unit/ec2_spec.rb
610
711
  - spec/unit/facter_spec.rb
611
712
  - spec/unit/filesystems_spec.rb
713
+ - spec/unit/fqdn_spec.rb
714
+ - spec/unit/gce/metadata_spec.rb
715
+ - spec/unit/gce_spec.rb
612
716
  - spec/unit/hardwareisa_spec.rb
613
717
  - spec/unit/hardwaremodel_spec.rb
614
718
  - spec/unit/hostname_spec.rb
@@ -634,6 +738,8 @@ test_files:
634
738
  - spec/unit/operatingsystem_spec.rb
635
739
  - spec/unit/operatingsystemmajrelease_spec.rb
636
740
  - spec/unit/operatingsystemrelease_spec.rb
741
+ - spec/unit/osfamily_spec.rb
742
+ - spec/unit/partitions_spec.rb
637
743
  - spec/unit/physicalprocessorcount_spec.rb
638
744
  - spec/unit/processor_spec.rb
639
745
  - spec/unit/ps_spec.rb
@@ -644,10 +750,12 @@ test_files:
644
750
  - spec/unit/util/collection_spec.rb
645
751
  - spec/unit/util/config_spec.rb
646
752
  - spec/unit/util/confine_spec.rb
753
+ - spec/unit/util/dhcp_servers_spec.rb
647
754
  - spec/unit/util/directory_loader_spec.rb
648
755
  - spec/unit/util/ec2_spec.rb
649
756
  - spec/unit/util/fact_spec.rb
650
757
  - spec/unit/util/file_read_spec.rb
758
+ - spec/unit/util/formatter_spec.rb
651
759
  - spec/unit/util/ip/windows_spec.rb
652
760
  - spec/unit/util/ip_spec.rb
653
761
  - spec/unit/util/loader_spec.rb
@@ -655,7 +763,11 @@ test_files:
655
763
  - spec/unit/util/macosx_spec.rb
656
764
  - spec/unit/util/manufacturer_spec.rb
657
765
  - spec/unit/util/normalization_spec.rb
766
+ - spec/unit/util/operatingsystem_spec.rb
658
767
  - spec/unit/util/parser_spec.rb
768
+ - spec/unit/util/partitions/partitions_spec.rb
769
+ - spec/unit/util/partitions_spec.rb
770
+ - spec/unit/util/posix_spec.rb
659
771
  - spec/unit/util/processor_spec.rb
660
772
  - spec/unit/util/registry_spec.rb
661
773
  - spec/unit/util/resolution_spec.rb