ohai 8.10.0 → 8.11.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (256) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -2
  3. data/Rakefile +13 -4
  4. data/bin/ohai +3 -4
  5. data/lib/ohai.rb +4 -4
  6. data/lib/ohai/application.rb +7 -6
  7. data/lib/ohai/common/dmi.rb +56 -56
  8. data/lib/ohai/config.rb +12 -8
  9. data/lib/ohai/dsl.rb +3 -3
  10. data/lib/ohai/dsl/plugin.rb +5 -5
  11. data/lib/ohai/dsl/plugin/versionvi.rb +0 -1
  12. data/lib/ohai/dsl/plugin/versionvii.rb +1 -0
  13. data/lib/ohai/hints.rb +1 -1
  14. data/lib/ohai/loader.rb +7 -7
  15. data/lib/ohai/log.rb +1 -1
  16. data/lib/ohai/mash.rb +3 -2
  17. data/lib/ohai/mixin/command.rb +25 -23
  18. data/lib/ohai/mixin/dmi_decode.rb +10 -10
  19. data/lib/ohai/mixin/ec2_metadata.rb +40 -39
  20. data/lib/ohai/mixin/gce_metadata.rb +9 -9
  21. data/lib/ohai/mixin/network_constants.rb +1 -1
  22. data/lib/ohai/mixin/os.rb +3 -3
  23. data/lib/ohai/mixin/seconds_to_human.rb +0 -2
  24. data/lib/ohai/mixin/softlayer_metadata.rb +10 -10
  25. data/lib/ohai/mixin/string.rb +2 -2
  26. data/lib/ohai/plugin_config.rb +1 -1
  27. data/lib/ohai/plugins/aix/cpu.rb +2 -2
  28. data/lib/ohai/plugins/aix/filesystem.rb +2 -2
  29. data/lib/ohai/plugins/aix/memory.rb +2 -2
  30. data/lib/ohai/plugins/aix/network.rb +9 -10
  31. data/lib/ohai/plugins/aix/os.rb +2 -2
  32. data/lib/ohai/plugins/aix/uptime.rb +3 -3
  33. data/lib/ohai/plugins/aix/virtualization.rb +23 -23
  34. data/lib/ohai/plugins/azure.rb +32 -5
  35. data/lib/ohai/plugins/bsd/virtualization.rb +22 -22
  36. data/lib/ohai/plugins/c.rb +3 -3
  37. data/lib/ohai/plugins/chef.rb +1 -1
  38. data/lib/ohai/plugins/cloud.rb +59 -60
  39. data/lib/ohai/plugins/cloud_v2.rb +37 -39
  40. data/lib/ohai/plugins/darwin/cpu.rb +1 -1
  41. data/lib/ohai/plugins/darwin/filesystem2.rb +5 -5
  42. data/lib/ohai/plugins/darwin/memory.rb +5 -6
  43. data/lib/ohai/plugins/darwin/network.rb +7 -7
  44. data/lib/ohai/plugins/darwin/system_profiler.rb +32 -33
  45. data/lib/ohai/plugins/darwin/virtualization.rb +9 -9
  46. data/lib/ohai/plugins/digital_ocean.rb +16 -16
  47. data/lib/ohai/plugins/dmi.rb +6 -6
  48. data/lib/ohai/plugins/dragonflybsd/cpu.rb +2 -2
  49. data/lib/ohai/plugins/dragonflybsd/memory.rb +0 -1
  50. data/lib/ohai/plugins/dragonflybsd/network.rb +4 -4
  51. data/lib/ohai/plugins/dragonflybsd/os.rb +1 -1
  52. data/lib/ohai/plugins/ec2.rb +39 -15
  53. data/lib/ohai/plugins/elixir.rb +1 -1
  54. data/lib/ohai/plugins/erlang.rb +3 -3
  55. data/lib/ohai/plugins/eucalyptus.rb +16 -12
  56. data/lib/ohai/plugins/freebsd/cpu.rb +2 -2
  57. data/lib/ohai/plugins/freebsd/memory.rb +0 -1
  58. data/lib/ohai/plugins/freebsd/network.rb +4 -4
  59. data/lib/ohai/plugins/freebsd/os.rb +1 -1
  60. data/lib/ohai/plugins/gce.rb +6 -6
  61. data/lib/ohai/plugins/hostname.rb +7 -7
  62. data/lib/ohai/plugins/init_package.rb +1 -1
  63. data/lib/ohai/plugins/ip_scopes.rb +9 -9
  64. data/lib/ohai/plugins/java.rb +1 -1
  65. data/lib/ohai/plugins/joyent.rb +7 -7
  66. data/lib/ohai/plugins/kernel.rb +8 -8
  67. data/lib/ohai/plugins/linode.rb +7 -4
  68. data/lib/ohai/plugins/linux/cpu.rb +5 -5
  69. data/lib/ohai/plugins/linux/filesystem.rb +16 -16
  70. data/lib/ohai/plugins/linux/filesystem2.rb +15 -15
  71. data/lib/ohai/plugins/linux/mdadm.rb +3 -3
  72. data/lib/ohai/plugins/linux/network.rb +85 -51
  73. data/lib/ohai/plugins/linux/platform.rb +24 -24
  74. data/lib/ohai/plugins/linux/virtualization.rb +8 -8
  75. data/lib/ohai/plugins/mono.rb +1 -1
  76. data/lib/ohai/plugins/netbsd/cpu.rb +1 -1
  77. data/lib/ohai/plugins/netbsd/network.rb +2 -2
  78. data/lib/ohai/plugins/network.rb +11 -11
  79. data/lib/ohai/plugins/network_listeners.rb +30 -26
  80. data/lib/ohai/plugins/ohai.rb +3 -3
  81. data/lib/ohai/plugins/openbsd/cpu.rb +4 -4
  82. data/lib/ohai/plugins/openbsd/memory.rb +4 -4
  83. data/lib/ohai/plugins/openbsd/network.rb +3 -3
  84. data/lib/ohai/plugins/openstack.rb +12 -12
  85. data/lib/ohai/plugins/os.rb +2 -2
  86. data/lib/ohai/plugins/packages.rb +22 -22
  87. data/lib/ohai/plugins/passwd.rb +4 -4
  88. data/lib/ohai/plugins/powershell.rb +9 -9
  89. data/lib/ohai/plugins/ps.rb +2 -2
  90. data/lib/ohai/plugins/python.rb +1 -1
  91. data/lib/ohai/plugins/rackspace.rb +13 -13
  92. data/lib/ohai/plugins/root_group.rb +4 -4
  93. data/lib/ohai/plugins/ruby.rb +6 -6
  94. data/lib/ohai/plugins/rust.rb +1 -1
  95. data/lib/ohai/plugins/sigar/cpu.rb +1 -1
  96. data/lib/ohai/plugins/sigar/filesystem.rb +1 -1
  97. data/lib/ohai/plugins/sigar/network.rb +13 -13
  98. data/lib/ohai/plugins/sigar/network_route.rb +34 -29
  99. data/lib/ohai/plugins/softlayer.rb +8 -7
  100. data/lib/ohai/plugins/solaris2/cpu.rb +19 -19
  101. data/lib/ohai/plugins/solaris2/dmi.rb +63 -63
  102. data/lib/ohai/plugins/solaris2/filesystem.rb +13 -13
  103. data/lib/ohai/plugins/solaris2/memory.rb +2 -2
  104. data/lib/ohai/plugins/solaris2/network.rb +5 -5
  105. data/lib/ohai/plugins/solaris2/virtualization.rb +18 -18
  106. data/lib/ohai/plugins/solaris2/zpools.rb +1 -1
  107. data/lib/ohai/plugins/ssh_host_key.rb +2 -2
  108. data/lib/ohai/plugins/uptime.rb +4 -5
  109. data/lib/ohai/plugins/virtualbox.rb +2 -2
  110. data/lib/ohai/plugins/virtualization.rb +17 -17
  111. data/lib/ohai/plugins/vmware.rb +2 -2
  112. data/lib/ohai/plugins/windows/cpu.rb +14 -14
  113. data/lib/ohai/plugins/windows/drivers.rb +8 -8
  114. data/lib/ohai/plugins/windows/filesystem.rb +4 -4
  115. data/lib/ohai/plugins/windows/memory.rb +1 -1
  116. data/lib/ohai/plugins/windows/network.rb +10 -10
  117. data/lib/ohai/plugins/windows/platform.rb +1 -2
  118. data/lib/ohai/plugins/windows/virtualization.rb +17 -17
  119. data/lib/ohai/provides_map.rb +7 -7
  120. data/lib/ohai/runner.rb +3 -3
  121. data/lib/ohai/system.rb +21 -20
  122. data/lib/ohai/util/file_helper.rb +1 -2
  123. data/lib/ohai/util/ip_helper.rb +4 -4
  124. data/lib/ohai/util/win32.rb +5 -5
  125. data/lib/ohai/util/win32/group_helper.rb +4 -5
  126. data/lib/ohai/version.rb +1 -1
  127. data/ohai.gemspec +7 -5
  128. data/spec/functional/application_spec.rb +23 -23
  129. data/spec/functional/loader_spec.rb +1 -1
  130. data/spec/functional/plugins/powershell_spec.rb +13 -13
  131. data/spec/functional/plugins/root_group_spec.rb +5 -5
  132. data/spec/ohai_spec.rb +1 -1
  133. data/spec/spec_helper.rb +9 -9
  134. data/spec/support/integration_helper.rb +7 -7
  135. data/spec/support/platform_helpers.rb +1 -1
  136. data/spec/unit/application_spec.rb +17 -17
  137. data/spec/unit/config_spec.rb +2 -2
  138. data/spec/unit/dsl/plugin_spec.rb +28 -28
  139. data/spec/unit/hints_spec.rb +3 -3
  140. data/spec/unit/loader_spec.rb +9 -9
  141. data/spec/unit/mixin/command_spec.rb +5 -5
  142. data/spec/unit/mixin/ec2_metadata_spec.rb +6 -6
  143. data/spec/unit/mixin/softlayer_metadata_spec.rb +19 -23
  144. data/spec/unit/plugin_config_spec.rb +5 -5
  145. data/spec/unit/plugins/abort_spec.rb +3 -3
  146. data/spec/unit/plugins/aix/cpu_spec.rb +1 -1
  147. data/spec/unit/plugins/aix/filesystem_spec.rb +25 -25
  148. data/spec/unit/plugins/aix/hostname_spec.rb +1 -2
  149. data/spec/unit/plugins/aix/kernel_spec.rb +3 -3
  150. data/spec/unit/plugins/aix/memory_spec.rb +8 -8
  151. data/spec/unit/plugins/aix/network_spec.rb +38 -38
  152. data/spec/unit/plugins/aix/os_spec.rb +1 -2
  153. data/spec/unit/plugins/aix/platform_spec.rb +1 -1
  154. data/spec/unit/plugins/aix/uptime_spec.rb +1 -1
  155. data/spec/unit/plugins/aix/virtualization_spec.rb +11 -11
  156. data/spec/unit/plugins/azure_spec.rb +118 -20
  157. data/spec/unit/plugins/bsd/filesystem_spec.rb +1 -1
  158. data/spec/unit/plugins/bsd/virtualization_spec.rb +4 -4
  159. data/spec/unit/plugins/c_spec.rb +12 -12
  160. data/spec/unit/plugins/chef_spec.rb +2 -2
  161. data/spec/unit/plugins/cloud_spec.rb +37 -37
  162. data/spec/unit/plugins/cloud_v2_spec.rb +64 -65
  163. data/spec/unit/plugins/darwin/cpu_spec.rb +1 -2
  164. data/spec/unit/plugins/darwin/filesystem2_spec.rb +7 -7
  165. data/spec/unit/plugins/darwin/filesystem_spec.rb +5 -5
  166. data/spec/unit/plugins/darwin/hostname_spec.rb +1 -4
  167. data/spec/unit/plugins/darwin/kernel_spec.rb +6 -10
  168. data/spec/unit/plugins/darwin/memory_spec.rb +5 -5
  169. data/spec/unit/plugins/darwin/network_spec.rb +352 -353
  170. data/spec/unit/plugins/darwin/platform_spec.rb +1 -2
  171. data/spec/unit/plugins/darwin/system_profiler_spec.rb +3 -3
  172. data/spec/unit/plugins/darwin/virtualization_spec.rb +6 -6
  173. data/spec/unit/plugins/digital_ocean_spec.rb +38 -37
  174. data/spec/unit/plugins/dmi_spec.rb +3 -3
  175. data/spec/unit/plugins/ec2_spec.rb +97 -88
  176. data/spec/unit/plugins/elixir_spec.rb +1 -2
  177. data/spec/unit/plugins/erlang_spec.rb +2 -2
  178. data/spec/unit/plugins/eucalyptus_spec.rb +19 -19
  179. data/spec/unit/plugins/fail_spec.rb +2 -2
  180. data/spec/unit/plugins/freebsd/cpu_spec.rb +14 -14
  181. data/spec/unit/plugins/freebsd/hostname_spec.rb +1 -2
  182. data/spec/unit/plugins/freebsd/kernel_spec.rb +2 -3
  183. data/spec/unit/plugins/freebsd/os_spec.rb +4 -5
  184. data/spec/unit/plugins/freebsd/platform_spec.rb +1 -2
  185. data/spec/unit/plugins/gce_spec.rb +9 -9
  186. data/spec/unit/plugins/go_spec.rb +1 -1
  187. data/spec/unit/plugins/groovy_spec.rb +1 -2
  188. data/spec/unit/plugins/hostname_spec.rb +1 -2
  189. data/spec/unit/plugins/init_package_spec.rb +1 -1
  190. data/spec/unit/plugins/ip_scopes_spec.rb +38 -38
  191. data/spec/unit/plugins/java_spec.rb +52 -1
  192. data/spec/unit/plugins/joyent_spec.rb +9 -11
  193. data/spec/unit/plugins/kernel_spec.rb +11 -12
  194. data/spec/unit/plugins/linode_spec.rb +29 -29
  195. data/spec/unit/plugins/linux/block_device_spec.rb +21 -21
  196. data/spec/unit/plugins/linux/cpu_spec.rb +3 -3
  197. data/spec/unit/plugins/linux/filesystem2_spec.rb +7 -7
  198. data/spec/unit/plugins/linux/filesystem_spec.rb +85 -86
  199. data/spec/unit/plugins/linux/hostname_spec.rb +1 -3
  200. data/spec/unit/plugins/linux/kernel_spec.rb +1 -1
  201. data/spec/unit/plugins/linux/lsb_spec.rb +1 -2
  202. data/spec/unit/plugins/linux/mdadm_spec.rb +4 -4
  203. data/spec/unit/plugins/linux/memory_spec.rb +29 -33
  204. data/spec/unit/plugins/linux/network_spec.rb +463 -245
  205. data/spec/unit/plugins/linux/platform_spec.rb +64 -65
  206. data/spec/unit/plugins/linux/uptime_spec.rb +1 -2
  207. data/spec/unit/plugins/linux/virtualization_spec.rb +42 -42
  208. data/spec/unit/plugins/lua_spec.rb +1 -2
  209. data/spec/unit/plugins/mono_spec.rb +1 -2
  210. data/spec/unit/plugins/netbsd/hostname_spec.rb +1 -2
  211. data/spec/unit/plugins/netbsd/kernel_spec.rb +1 -2
  212. data/spec/unit/plugins/netbsd/platform_spec.rb +1 -1
  213. data/spec/unit/plugins/network_spec.rb +118 -118
  214. data/spec/unit/plugins/nodejs_spec.rb +1 -1
  215. data/spec/unit/plugins/ohai_spec.rb +1 -1
  216. data/spec/unit/plugins/ohai_time_spec.rb +1 -2
  217. data/spec/unit/plugins/openbsd/hostname_spec.rb +1 -2
  218. data/spec/unit/plugins/openbsd/kernel_spec.rb +1 -2
  219. data/spec/unit/plugins/openbsd/platform_spec.rb +1 -2
  220. data/spec/unit/plugins/openstack_spec.rb +35 -37
  221. data/spec/unit/plugins/os_spec.rb +7 -8
  222. data/spec/unit/plugins/packages_spec.rb +118 -118
  223. data/spec/unit/plugins/passwd_spec.rb +18 -18
  224. data/spec/unit/plugins/perl_spec.rb +1 -1
  225. data/spec/unit/plugins/php_spec.rb +4 -4
  226. data/spec/unit/plugins/platform_spec.rb +8 -9
  227. data/spec/unit/plugins/powershell_spec.rb +3 -3
  228. data/spec/unit/plugins/python_spec.rb +1 -1
  229. data/spec/unit/plugins/rackspace_spec.rb +66 -68
  230. data/spec/unit/plugins/root_group_spec.rb +26 -26
  231. data/spec/unit/plugins/ruby_spec.rb +14 -15
  232. data/spec/unit/plugins/rust_spec.rb +2 -2
  233. data/spec/unit/plugins/sigar/network_route_spec.rb +36 -36
  234. data/spec/unit/plugins/softlayer_spec.rb +10 -10
  235. data/spec/unit/plugins/solaris2/cpu_spec.rb +20 -21
  236. data/spec/unit/plugins/solaris2/dmi_spec.rb +5 -6
  237. data/spec/unit/plugins/solaris2/filesystem.rb +5 -5
  238. data/spec/unit/plugins/solaris2/hostname_spec.rb +1 -1
  239. data/spec/unit/plugins/solaris2/kernel_spec.rb +3 -3
  240. data/spec/unit/plugins/solaris2/memory_spec.rb +5 -5
  241. data/spec/unit/plugins/solaris2/network_spec.rb +7 -8
  242. data/spec/unit/plugins/solaris2/platform_spec.rb +1 -1
  243. data/spec/unit/plugins/solaris2/virtualization_spec.rb +3 -5
  244. data/spec/unit/plugins/solaris2/zpools_spec.rb +6 -6
  245. data/spec/unit/plugins/ssh_host_keys_spec.rb +1 -1
  246. data/spec/unit/plugins/virtualbox_spec.rb +19 -19
  247. data/spec/unit/plugins/vmware_spec.rb +28 -28
  248. data/spec/unit/plugins/windows/cpu_spec.rb +46 -48
  249. data/spec/unit/plugins/windows/memory_spec.rb +5 -5
  250. data/spec/unit/plugins/windows/virtualization_spec.rb +163 -163
  251. data/spec/unit/provides_map_spec.rb +10 -10
  252. data/spec/unit/runner_spec.rb +10 -10
  253. data/spec/unit/system_spec.rb +19 -19
  254. data/spec/unit/util/file_helper_spec.rb +5 -6
  255. data/spec/unit/util/ip_helper_spec.rb +39 -39
  256. metadata +31 -4
@@ -16,9 +16,8 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
-
20
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
21
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
19
+ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb")
20
+ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb")
22
21
 
23
22
  describe Ohai::System, "Linux plugin platform" do
24
23
 
@@ -203,9 +202,9 @@ describe Ohai::System, "Linux plugin platform" do
203
202
  end
204
203
 
205
204
  it "should set platform_version to kernel release" do
206
- expect(@plugin).to receive(:`).with('uname -r').and_return('3.18.2-2-ARCH')
205
+ expect(@plugin).to receive(:`).with("uname -r").and_return("3.18.2-2-ARCH")
207
206
  @plugin.run
208
- expect(@plugin[:platform_version]).to eq('3.18.2-2-ARCH')
207
+ expect(@plugin[:platform_version]).to eq("3.18.2-2-ARCH")
209
208
  end
210
209
  end
211
210
 
@@ -238,7 +237,7 @@ describe Ohai::System, "Linux plugin platform" do
238
237
  @plugin.run
239
238
  expect(@plugin[:platform]).to eq("alpine")
240
239
  expect(@plugin[:platform_family]).to eq("alpine")
241
- expect(@plugin[:platform_version]).to eq('3.2.3')
240
+ expect(@plugin[:platform_version]).to eq("3.2.3")
242
241
  end
243
242
  end
244
243
 
@@ -257,9 +256,9 @@ describe Ohai::System, "Linux plugin platform" do
257
256
  end
258
257
 
259
258
  it "should set platform_version to kernel release" do
260
- expect(@plugin).to receive(:`).with('uname -r').and_return('3.18.2-2-ARCH')
259
+ expect(@plugin).to receive(:`).with("uname -r").and_return("3.18.2-2-ARCH")
261
260
  @plugin.run
262
- expect(@plugin[:platform_version]).to eq('3.18.2-2-ARCH')
261
+ expect(@plugin[:platform_version]).to eq("3.18.2-2-ARCH")
263
262
  end
264
263
 
265
264
  end
@@ -671,114 +670,114 @@ CISCO_RELEASE
671
670
 
672
671
  describe '#read_os_release_info' do
673
672
  let(:file_contents) { "COW=MOO\nDOG=\"BARK\"" }
674
- it 'returns nil if the file does not exist' do
675
- allow(File).to receive(:exist?).with('/etc/test-release').and_return(false)
676
- expect(@plugin.read_os_release_info('/etc/test-release')).to be nil
673
+ it "returns nil if the file does not exist" do
674
+ allow(File).to receive(:exist?).with("/etc/test-release").and_return(false)
675
+ expect(@plugin.read_os_release_info("/etc/test-release")).to be nil
677
676
  end
678
677
 
679
- it 'returns a hash of expected contents' do
680
- allow(File).to receive(:exist?).with('/etc/test-release').and_return(true)
681
- allow(File).to receive(:read).with('/etc/test-release').and_return(file_contents)
682
- release_info = @plugin.read_os_release_info('/etc/test-release')
678
+ it "returns a hash of expected contents" do
679
+ allow(File).to receive(:exist?).with("/etc/test-release").and_return(true)
680
+ allow(File).to receive(:read).with("/etc/test-release").and_return(file_contents)
681
+ release_info = @plugin.read_os_release_info("/etc/test-release")
683
682
 
684
- expect(release_info['COW']).to eq('MOO')
685
- expect(release_info['DOG']).to eq('BARK')
683
+ expect(release_info["COW"]).to eq("MOO")
684
+ expect(release_info["DOG"]).to eq("BARK")
686
685
  end
687
686
  end
688
687
 
689
688
  describe '#os_release_info' do
690
- context 'when CISCO_RELEASE_INFO is not populated' do
691
- let(:release_info) { { 'ID' => 'os_id' } }
689
+ context "when CISCO_RELEASE_INFO is not populated" do
690
+ let(:release_info) { { "ID" => "os_id" } }
692
691
 
693
692
  before do
694
- allow(File).to receive(:exist?).with('/etc/os-release').and_return(true)
695
- allow(@plugin).to receive(:read_os_release_info).with('/etc/os-release').and_return(release_info)
693
+ allow(File).to receive(:exist?).with("/etc/os-release").and_return(true)
694
+ allow(@plugin).to receive(:read_os_release_info).with("/etc/os-release").and_return(release_info)
696
695
  end
697
696
 
698
- it 'reads the os-release file' do
699
- expect(@plugin).to receive(:read_os_release_info).with('/etc/os-release').and_return(release_info)
697
+ it "reads the os-release file" do
698
+ expect(@plugin).to receive(:read_os_release_info).with("/etc/os-release").and_return(release_info)
700
699
  @plugin.os_release_info
701
700
  end
702
701
 
703
- it 'returns a hash of expected contents' do
704
- expect(@plugin.os_release_info['ID']).to eq('os_id')
702
+ it "returns a hash of expected contents" do
703
+ expect(@plugin.os_release_info["ID"]).to eq("os_id")
705
704
  end
706
705
  end
707
706
 
708
- context 'when CISCO_RELEASE_INFO is populated' do
709
- let(:release_info) { { 'ID' => 'os_id', 'CISCO_RELEASE_INFO' => '/etc/cisco-release' } }
710
- let(:cisco_release_info) { { 'ID' => 'cisco_id' } }
707
+ context "when CISCO_RELEASE_INFO is populated" do
708
+ let(:release_info) { { "ID" => "os_id", "CISCO_RELEASE_INFO" => "/etc/cisco-release" } }
709
+ let(:cisco_release_info) { { "ID" => "cisco_id" } }
711
710
 
712
711
  before do
713
- allow(File).to receive(:exist?).with('/etc/os-release').and_return(true)
714
- allow(File).to receive(:exist?).with('/etc/cisco-release').and_return(true)
715
- allow(@plugin).to receive(:read_os_release_info).with('/etc/os-release').and_return(release_info)
716
- allow(@plugin).to receive(:read_os_release_info).with('/etc/cisco-release').and_return(cisco_release_info)
712
+ allow(File).to receive(:exist?).with("/etc/os-release").and_return(true)
713
+ allow(File).to receive(:exist?).with("/etc/cisco-release").and_return(true)
714
+ allow(@plugin).to receive(:read_os_release_info).with("/etc/os-release").and_return(release_info)
715
+ allow(@plugin).to receive(:read_os_release_info).with("/etc/cisco-release").and_return(cisco_release_info)
717
716
  end
718
717
 
719
- it 'reads the os-release AND the cisco-release file' do
720
- expect(@plugin).to receive(:read_os_release_info).with('/etc/os-release').and_return(release_info)
721
- expect(@plugin).to receive(:read_os_release_info).with('/etc/cisco-release').and_return(release_info)
718
+ it "reads the os-release AND the cisco-release file" do
719
+ expect(@plugin).to receive(:read_os_release_info).with("/etc/os-release").and_return(release_info)
720
+ expect(@plugin).to receive(:read_os_release_info).with("/etc/cisco-release").and_return(release_info)
722
721
  @plugin.os_release_info
723
722
  end
724
723
 
725
- it 'returns the ID from the cisco-release file instead of the os-release file' do
726
- expect(@plugin.os_release_info['ID']).to eq('cisco_id')
724
+ it "returns the ID from the cisco-release file instead of the os-release file" do
725
+ expect(@plugin.os_release_info["ID"]).to eq("cisco_id")
727
726
  end
728
727
  end
729
728
  end
730
729
 
731
- describe 'on Wind River Linux 5 for Cisco Nexus' do
730
+ describe "on Wind River Linux 5 for Cisco Nexus" do
732
731
  let(:have_os_release) { true }
733
732
  let(:os_release_info) do
734
733
  {
735
- 'ID' => 'nexus',
736
- 'ID_LIKE' => 'wrlinux',
737
- 'NAME' => 'Nexus',
738
- 'VERSION' => '7.0(3)I2(0.475E.6)',
739
- 'VERSION_ID' => '7.0(3)I2',
740
- 'PRETTY_NAME' => 'Nexus 7.0(3)I2',
741
- 'HOME_URL' => 'http://www.cisco.com',
742
- 'BUILD_ID' => '6',
743
- 'CISCO_RELEASE_INFO' => '/etc/os-release'
734
+ "ID" => "nexus",
735
+ "ID_LIKE" => "wrlinux",
736
+ "NAME" => "Nexus",
737
+ "VERSION" => "7.0(3)I2(0.475E.6)",
738
+ "VERSION_ID" => "7.0(3)I2",
739
+ "PRETTY_NAME" => "Nexus 7.0(3)I2",
740
+ "HOME_URL" => "http://www.cisco.com",
741
+ "BUILD_ID" => "6",
742
+ "CISCO_RELEASE_INFO" => "/etc/os-release",
744
743
  }
745
744
  end
746
745
 
747
- it 'should set platform to nexus and platform_family to wrlinux' do
746
+ it "should set platform to nexus and platform_family to wrlinux" do
748
747
  allow(@plugin).to receive(:os_release_info).and_return(os_release_info)
749
748
  @plugin.lsb = nil
750
749
  @plugin.run
751
750
 
752
- expect(@plugin[:platform]).to eq('nexus')
753
- expect(@plugin[:platform_family]).to eq('wrlinux')
754
- expect(@plugin[:platform_version]).to eq('7.0(3)I2(0.475E.6)')
751
+ expect(@plugin[:platform]).to eq("nexus")
752
+ expect(@plugin[:platform_family]).to eq("wrlinux")
753
+ expect(@plugin[:platform_version]).to eq("7.0(3)I2(0.475E.6)")
755
754
  end
756
755
  end
757
756
 
758
- describe 'on Wind River Linux 7 for Cisco IOS-XR' do
757
+ describe "on Wind River Linux 7 for Cisco IOS-XR" do
759
758
  let(:have_os_release) { true }
760
759
  let(:os_release_info) do
761
760
  {
762
- 'ID' => 'ios_xr',
763
- 'ID_LIKE' => 'cisco-wrlinux wrlinux',
764
- 'NAME' => 'IOS XR',
765
- 'VERSION' => '6.0.0.14I',
766
- 'VERSION_ID' => '6.0.0.14I',
767
- 'PRETTY_NAME' => 'Cisco IOS XR Software, Version 6.0.0.14I',
768
- 'BUILD_ID' => '2015-09-10-15-50-17',
769
- 'HOME_URL' => 'http://www.cisco.com',
770
- 'CISCO_RELEASE_INFO' => '/etc/os-release'
761
+ "ID" => "ios_xr",
762
+ "ID_LIKE" => "cisco-wrlinux wrlinux",
763
+ "NAME" => "IOS XR",
764
+ "VERSION" => "6.0.0.14I",
765
+ "VERSION_ID" => "6.0.0.14I",
766
+ "PRETTY_NAME" => "Cisco IOS XR Software, Version 6.0.0.14I",
767
+ "BUILD_ID" => "2015-09-10-15-50-17",
768
+ "HOME_URL" => "http://www.cisco.com",
769
+ "CISCO_RELEASE_INFO" => "/etc/os-release",
771
770
  }
772
771
  end
773
772
 
774
- it 'should set platform to ios_xr and platform_family to wrlinux' do
773
+ it "should set platform to ios_xr and platform_family to wrlinux" do
775
774
  allow(@plugin).to receive(:os_release_info).and_return(os_release_info)
776
775
  @plugin.lsb = nil
777
776
  @plugin.run
778
777
 
779
- expect(@plugin[:platform]).to eq('ios_xr')
780
- expect(@plugin[:platform_family]).to eq('wrlinux')
781
- expect(@plugin[:platform_version]).to eq('6.0.0.14I')
778
+ expect(@plugin[:platform]).to eq("ios_xr")
779
+ expect(@plugin[:platform_family]).to eq("wrlinux")
780
+ expect(@plugin[:platform_version]).to eq("6.0.0.14I")
782
781
  end
783
782
  end
784
783
  end
@@ -16,8 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
-
20
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
19
+ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb")
21
20
 
22
21
  describe Ohai::System, "Linux plugin uptime" do
23
22
  before(:each) do
@@ -16,7 +16,7 @@
16
16
  # limitations under the License.
17
17
  #
18
18
 
19
- require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper.rb')
19
+ require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb")
20
20
 
21
21
  describe Ohai::System, "Linux virtualization platform" do
22
22
  let(:plugin) { get_plugin("linux/virtualization") }
@@ -72,7 +72,7 @@ describe Ohai::System, "Linux virtualization platform" do
72
72
  it "does not set virtualization if xen isn't there" do
73
73
  expect(File).to receive(:exist?).at_least(:once).and_return(false)
74
74
  plugin.run
75
- expect(plugin[:virtualization]).to eq({'systems' => {}})
75
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
76
76
  end
77
77
  end
78
78
 
@@ -116,7 +116,7 @@ describe Ohai::System, "Linux virtualization platform" do
116
116
  it "does not set virtualization if kvm isn't there" do
117
117
  expect(File).to receive(:exist?).at_least(:once).and_return(false)
118
118
  plugin.run
119
- expect(plugin[:virtualization]).to eq({'systems' => {}})
119
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
120
120
  end
121
121
  end
122
122
 
@@ -142,7 +142,7 @@ describe Ohai::System, "Linux virtualization platform" do
142
142
  it "does not set virtualization if vbox isn't there" do
143
143
  expect(File).to receive(:exist?).at_least(:once).and_return(false)
144
144
  plugin.run
145
- expect(plugin[:virtualization]).to eq({'systems' => {}})
145
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
146
146
  end
147
147
  end
148
148
 
@@ -152,7 +152,7 @@ describe Ohai::System, "Linux virtualization platform" do
152
152
  end
153
153
 
154
154
  it "sets virtualpc guest if dmidecode detects Microsoft Virtual Machine" do
155
- ms_vpc_dmidecode=<<-MSVPC
155
+ ms_vpc_dmidecode = <<-MSVPC
156
156
  System Information
157
157
  Manufacturer: Microsoft Corporation
158
158
  Product Name: Virtual Machine
@@ -169,7 +169,7 @@ MSVPC
169
169
  end
170
170
 
171
171
  it "sets hyperv guest if dmidecode detects Hyper-V or version 7.0" do
172
- ms_hv_dmidecode=<<-MSHV
172
+ ms_hv_dmidecode = <<-MSHV
173
173
  System Information
174
174
  Manufacturer: Microsoft Corporation
175
175
  Product Name: Virtual Machine
@@ -186,7 +186,7 @@ MSHV
186
186
  end
187
187
 
188
188
  it "sets virtualserver guest if dmidecode detects version 5.0" do
189
- ms_vs_dmidecode=<<-MSVS
189
+ ms_vs_dmidecode = <<-MSVS
190
190
  System Information
191
191
  Manufacturer: Microsoft Corporation
192
192
  Product Name: Virtual Machine
@@ -203,7 +203,7 @@ MSVS
203
203
  end
204
204
 
205
205
  it "sets vmware guest if dmidecode detects VMware" do
206
- vmware_dmidecode=<<-VMWARE
206
+ vmware_dmidecode = <<-VMWARE
207
207
  System Information
208
208
  Manufacturer: VMware, Inc.
209
209
  Product Name: VMware Virtual Platform
@@ -222,7 +222,7 @@ VMWARE
222
222
  end
223
223
 
224
224
  it "sets vbox guest if dmidecode detects VirtualBox" do
225
- vbox_dmidecode=<<-VBOX
225
+ vbox_dmidecode = <<-VBOX
226
226
  Base Board Information
227
227
  Manufacturer: Oracle Corporation
228
228
  Product Name: VirtualBox
@@ -243,7 +243,7 @@ VBOX
243
243
  end
244
244
 
245
245
  it "sets openstack guest if dmidecode detects OpenStack" do
246
- openstack_dmidecode=<<-OPENSTACK
246
+ openstack_dmidecode = <<-OPENSTACK
247
247
  System Information
248
248
  Manufacturer: Red Hat Inc.
249
249
  Product Name: OpenStack Nova
@@ -262,7 +262,7 @@ OPENSTACK
262
262
  end
263
263
 
264
264
  it "sets kvm guest if dmidecode contains KVM" do
265
- kvm_dmidecode=<<-RKVM
265
+ kvm_dmidecode = <<-RKVM
266
266
  System Information
267
267
  Manufacturer: Red Hat
268
268
  Product Name: KVM
@@ -281,7 +281,7 @@ RKVM
281
281
  end
282
282
 
283
283
  it "sets kvm guest if dmidecode detects RHEV" do
284
- kvm_dmidecode=<<-RHEV
284
+ kvm_dmidecode = <<-RHEV
285
285
  System Information
286
286
  Manufacturer: Red Hat
287
287
  Product Name: RHEV Hypervisor
@@ -302,7 +302,7 @@ RHEV
302
302
  it "should run dmidecode and not set virtualization if nothing is detected" do
303
303
  allow(plugin).to receive(:shell_out).with("dmidecode").and_return(mock_shell_out(0, "", ""))
304
304
  plugin.run
305
- expect(plugin[:virtualization]).to eq({'systems' => {}})
305
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
306
306
  end
307
307
  end
308
308
 
@@ -313,7 +313,7 @@ RHEV
313
313
  plugin.run
314
314
  expect(plugin[:virtualization][:system]).to eq("linux-vserver")
315
315
  expect(plugin[:virtualization][:role]).to eq("host")
316
- expect(plugin[:virtualization][:systems]['linux-vserver']).to eq("host")
316
+ expect(plugin[:virtualization][:systems]["linux-vserver"]).to eq("host")
317
317
  end
318
318
 
319
319
  it "sets Linux-VServer host if /proc/self/status contains VxID: 0" do
@@ -322,7 +322,7 @@ RHEV
322
322
  plugin.run
323
323
  expect(plugin[:virtualization][:system]).to eq("linux-vserver")
324
324
  expect(plugin[:virtualization][:role]).to eq("host")
325
- expect(plugin[:virtualization][:systems]['linux-vserver']).to eq("host")
325
+ expect(plugin[:virtualization][:systems]["linux-vserver"]).to eq("host")
326
326
  end
327
327
 
328
328
  it "sets Linux-VServer host if /proc/self/status contains multiple space VxID: 0" do
@@ -331,7 +331,7 @@ RHEV
331
331
  plugin.run
332
332
  expect(plugin[:virtualization][:system]).to eq("linux-vserver")
333
333
  expect(plugin[:virtualization][:role]).to eq("host")
334
- expect(plugin[:virtualization][:systems]['linux-vserver']).to eq("host")
334
+ expect(plugin[:virtualization][:systems]["linux-vserver"]).to eq("host")
335
335
  end
336
336
 
337
337
  it "sets Linux-VServer host if /proc/self/status contains tabbed VxID:\t0" do
@@ -340,7 +340,7 @@ RHEV
340
340
  plugin.run
341
341
  expect(plugin[:virtualization][:system]).to eq("linux-vserver")
342
342
  expect(plugin[:virtualization][:role]).to eq("host")
343
- expect(plugin[:virtualization][:systems]['linux-vserver']).to eq("host")
343
+ expect(plugin[:virtualization][:systems]["linux-vserver"]).to eq("host")
344
344
  end
345
345
 
346
346
  it "sets Linux-VServer guest if /proc/self/status contains s_context > 0" do
@@ -349,7 +349,7 @@ RHEV
349
349
  plugin.run
350
350
  expect(plugin[:virtualization][:system]).to eq("linux-vserver")
351
351
  expect(plugin[:virtualization][:role]).to eq("guest")
352
- expect(plugin[:virtualization][:systems]['linux-vserver']).to eq("guest")
352
+ expect(plugin[:virtualization][:systems]["linux-vserver"]).to eq("guest")
353
353
  end
354
354
 
355
355
  it "sets Linux-VServer guest if /proc/self/status contains VxID > 0" do
@@ -358,13 +358,13 @@ RHEV
358
358
  plugin.run
359
359
  expect(plugin[:virtualization][:system]).to eq("linux-vserver")
360
360
  expect(plugin[:virtualization][:role]).to eq("guest")
361
- expect(plugin[:virtualization][:systems]['linux-vserver']).to eq("guest")
361
+ expect(plugin[:virtualization][:systems]["linux-vserver"]).to eq("guest")
362
362
  end
363
363
 
364
364
  it "does not set virtualization if Linux-VServer isn't there" do
365
365
  expect(File).to receive(:exist?).at_least(:once).and_return(false)
366
366
  plugin.run
367
- expect(plugin[:virtualization]).to eq({'systems' => {}})
367
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
368
368
  end
369
369
  end
370
370
 
@@ -390,13 +390,13 @@ RHEV
390
390
  expect(File).to receive(:exist?).with("/proc/bc/0").and_return(false)
391
391
  expect(File).to receive(:exist?).with("/proc/vz").and_return(false)
392
392
  plugin.run
393
- expect(plugin[:virtualization]).to eq({'systems' => {}})
393
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
394
394
  end
395
395
  end
396
396
 
397
397
  describe "when we are checking for parallels" do
398
398
  it "sets parallels guest if /proc/bus/pci/devices contains 1ab84000" do
399
- devices=<<-DEVICES
399
+ devices = <<-DEVICES
400
400
  0018 1ab84000 1f 8001 0 0 0 0 0 0 20 0 0 0 0 0 0 prl_tg
401
401
  0028 1af41000 17 8201 ee000000 0 0 0 0 0 40 1000 0 0 0 0 0 virtio-pci
402
402
  DEVICES
@@ -409,20 +409,20 @@ RHEV
409
409
  end
410
410
 
411
411
  it "does not set virtualization if /proc/bus/pci/devices not contains 1ab84000" do
412
- devices=<<-DEVICES
412
+ devices = <<-DEVICES
413
413
  0030 1af41000 a 8401 ee040000 0 0 0 0 0 40 1000 0 0 0 0 0 virtio-pci
414
414
  0050 10110022 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
415
415
  DEVICES
416
416
  expect(File).to receive(:exist?).with("/proc/bus/pci/devices").and_return(true)
417
417
  allow(File).to receive(:read).with("/proc/bus/pci/devices").and_return(devices)
418
418
  plugin.run
419
- expect(plugin[:virtualization]).to eq({'systems' => {}})
419
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
420
420
  end
421
421
  end
422
422
 
423
423
  describe "when we are checking for lxc" do
424
424
  it "sets lxc guest if /proc/self/cgroup exist and there are /lxc/<hexadecimal> mounts" do
425
- self_cgroup=<<-CGROUP
425
+ self_cgroup = <<-CGROUP
426
426
  8:blkio:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
427
427
  7:net_cls:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
428
428
  6:freezer:/lxc/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
@@ -441,7 +441,7 @@ CGROUP
441
441
  end
442
442
 
443
443
  it "sets lxc guest if /proc/self/cgroup exist and there are /lxc/<name> mounts" do
444
- self_cgroup=<<-CGROUP
444
+ self_cgroup = <<-CGROUP
445
445
  8:blkio:/lxc/vanilla
446
446
  7:net_cls:/lxc/vanilla
447
447
  6:freezer:/lxc/vanilla
@@ -460,7 +460,7 @@ CGROUP
460
460
  end
461
461
 
462
462
  it "sets not set anything if /proc/self/cgroup exist and the cgroup is named arbitrarily, it isn't necessarily lxc." do
463
- self_cgroup=<<-CGROUP
463
+ self_cgroup = <<-CGROUP
464
464
  8:blkio:/Charlie
465
465
  7:net_cls:/Charlie
466
466
  6:freezer:/Charlie
@@ -473,12 +473,12 @@ CGROUP
473
473
  expect(File).to receive(:exist?).with("/proc/self/cgroup").and_return(true)
474
474
  allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
475
475
  plugin.run
476
- expect(plugin[:virtualization]).to eq({'systems' => {}})
476
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
477
477
  end
478
478
 
479
479
  context "/proc/self/cgroup only has / mounts" do
480
480
  before(:each) do
481
- self_cgroup=<<-CGROUP
481
+ self_cgroup = <<-CGROUP
482
482
  8:blkio:/
483
483
  7:net_cls:/
484
484
  6:freezer:/
@@ -515,7 +515,7 @@ CGROUP
515
515
  plugin.run
516
516
  expect(plugin[:virtualization][:system]).to be_nil
517
517
  expect(plugin[:virtualization][:role]).to be_nil
518
- expect(plugin[:virtualization]).to eq({'systems' => {}})
518
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
519
519
  end
520
520
 
521
521
  end
@@ -523,13 +523,13 @@ CGROUP
523
523
  it "does not set virtualization if /proc/self/cgroup isn't there" do
524
524
  expect(File).to receive(:exist?).with("/proc/self/cgroup").and_return(false)
525
525
  plugin.run
526
- expect(plugin[:virtualization]).to eq({'systems' => {}})
526
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
527
527
  end
528
528
  end
529
529
 
530
530
  describe "when we are checking for docker" do
531
531
  it "sets docker guest if /proc/self/cgroup exist and there are /docker/<hexadecimal> mounts" do
532
- self_cgroup=<<-CGROUP
532
+ self_cgroup = <<-CGROUP
533
533
  8:blkio:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
534
534
  7:net_cls:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
535
535
  6:freezer:/docker/baa660ed81bc81d262ac6e19486142aeec5fce2043e2a173eb2505c6fbed89bc
@@ -548,7 +548,7 @@ CGROUP
548
548
  end
549
549
 
550
550
  it "sets docker guest if /proc/self/cgroup exist and there are /docker/<name> mounts" do
551
- self_cgroup=<<-CGROUP
551
+ self_cgroup = <<-CGROUP
552
552
  8:blkio:/docker/vanilla
553
553
  7:net_cls:/docker/vanilla
554
554
  6:freezer:/docker/vanilla
@@ -569,7 +569,7 @@ CGROUP
569
569
  # Relevant at least starting docker 1.6.2, kernel 4.0.5 & systemd 224-1.
570
570
  # Doi not exactly know which software/version really matters here.
571
571
  it "should set docker guest if /proc/self/cgroup exists and there are /system.slice/docker-<hexadecimal> mounts (systemd managed cgroup)" do
572
- self_cgroup=<<-CGROUP
572
+ self_cgroup = <<-CGROUP
573
573
  8:devices:/system.slice/docker-47341c91be8d491cb3b8a475ad5b4aef6e79bf728cbb351c384e4a6c410f172f.scope
574
574
  7:cpuset:/system.slice/docker-47341c91be8d491cb3b8a475ad5b4aef6e79bf728cbb351c384e4a6c410f172f.scope
575
575
  6:blkio:/system.slice/docker-47341c91be8d491cb3b8a475ad5b4aef6e79bf728cbb351c384e4a6c410f172f.scope
@@ -588,7 +588,7 @@ CGROUP
588
588
  end
589
589
 
590
590
  it "sets not set anything if /proc/self/cgroup exist and the cgroup is named arbitrarily, it isn't necessarily lxc." do
591
- self_cgroup=<<-CGROUP
591
+ self_cgroup = <<-CGROUP
592
592
  8:blkio:/Charlie
593
593
  7:net_cls:/Charlie
594
594
  6:freezer:/Charlie
@@ -601,12 +601,12 @@ CGROUP
601
601
  allow(File).to receive(:exist?).with("/proc/self/cgroup").and_return(true)
602
602
  allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
603
603
  plugin.run
604
- expect(plugin[:virtualization]).to eq({'systems' => {}})
604
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
605
605
  end
606
606
 
607
607
  context "/proc/self/cgroup only has / mounts" do
608
608
  before(:each) do
609
- self_cgroup=<<-CGROUP
609
+ self_cgroup = <<-CGROUP
610
610
  8:blkio:/
611
611
  7:net_cls:/
612
612
  6:freezer:/
@@ -619,7 +619,7 @@ CGROUP
619
619
  allow(File).to receive(:exist?).with("/proc/self/cgroup").and_return(true)
620
620
  allow(File).to receive(:read).with("/proc/self/cgroup").and_return(self_cgroup)
621
621
  plugin.run
622
- expect(plugin[:virtualization]).to eq({'systems' => {}})
622
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
623
623
  end
624
624
 
625
625
  end
@@ -639,13 +639,13 @@ CGROUP
639
639
  plugin.run
640
640
  expect(plugin[:virtualization][:system]).to be_nil
641
641
  expect(plugin[:virtualization][:role]).to be_nil
642
- expect(plugin[:virtualization]).to eq({'systems' => {}})
642
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
643
643
  end
644
644
 
645
645
  it "does not set virtualization if /proc/self/cgroup isn't there" do
646
646
  allow(File).to receive(:exist?).with("/proc/self/cgroup").and_return(false)
647
647
  plugin.run
648
- expect(plugin[:virtualization]).to eq({'systems' => {}})
648
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
649
649
  end
650
650
 
651
651
  it "sets virtualization if /.dockerenv exists" do
@@ -668,13 +668,13 @@ CGROUP
668
668
  allow(File).to receive(:exist?).with("/.dockerenv").and_return(false)
669
669
  allow(File).to receive(:exist?).with("/.dockerinit").and_return(false)
670
670
  plugin.run
671
- expect(plugin[:virtualization]).to eq({'systems' => {}})
671
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
672
672
  end
673
673
 
674
674
  end
675
675
 
676
676
  it "does not set virtualization if no tests match" do
677
677
  plugin.run
678
- expect(plugin[:virtualization]).to eq({'systems' => {}})
678
+ expect(plugin[:virtualization]).to eq({ "systems" => {} })
679
679
  end
680
680
  end