ohai 14.15.0 → 15.0.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/ohai/application.rb +0 -4
- data/lib/ohai/common/dmi.rb +43 -43
- data/lib/ohai/config.rb +1 -1
- data/lib/ohai/loader.rb +32 -47
- data/lib/ohai/mixin/dmi_decode.rb +29 -32
- data/lib/ohai/mixin/os.rb +0 -2
- data/lib/ohai/mixin/softlayer_metadata.rb +5 -5
- data/lib/ohai/plugins/aix/virtualization.rb +4 -4
- data/lib/ohai/plugins/bsd/virtualization.rb +10 -12
- data/lib/ohai/plugins/c.rb +0 -20
- data/lib/ohai/plugins/elixir.rb +13 -13
- data/lib/ohai/plugins/filesystem.rb +10 -10
- data/lib/ohai/plugins/gce.rb +42 -8
- data/lib/ohai/plugins/go.rb +11 -11
- data/lib/ohai/plugins/groovy.rb +12 -12
- data/lib/ohai/plugins/hostname.rb +9 -2
- data/lib/ohai/plugins/linux/fips.rb +2 -9
- data/lib/ohai/plugins/linux/memory.rb +5 -0
- data/lib/ohai/plugins/linux/network.rb +1 -1
- data/lib/ohai/plugins/linux/platform.rb +84 -83
- data/lib/ohai/plugins/linux/systemd_paths.rb +0 -3
- data/lib/ohai/plugins/linux/virtualization.rb +10 -20
- data/lib/ohai/plugins/lua.rb +13 -13
- data/lib/ohai/plugins/mono.rb +23 -23
- data/lib/ohai/plugins/nodejs.rb +13 -13
- data/lib/ohai/plugins/openstack.rb +1 -1
- data/lib/ohai/plugins/packages.rb +1 -28
- data/lib/ohai/plugins/perl.rb +17 -17
- data/lib/ohai/plugins/php.rb +22 -22
- data/lib/ohai/plugins/powershell.rb +30 -30
- data/lib/ohai/plugins/ps.rb +1 -1
- data/lib/ohai/plugins/python.rb +15 -15
- data/lib/ohai/plugins/rust.rb +11 -11
- data/lib/ohai/plugins/solaris2/dmi.rb +48 -48
- data/lib/ohai/plugins/solaris2/virtualization.rb +8 -10
- data/lib/ohai/plugins/virtualbox.rb +21 -21
- data/lib/ohai/plugins/windows/filesystem.rb +2 -2
- data/lib/ohai/plugins/windows/fips.rb +2 -21
- data/lib/ohai/plugins/windows/virtualization.rb +9 -35
- data/lib/ohai/runner.rb +2 -2
- data/lib/ohai/system.rb +0 -17
- data/lib/ohai/version.rb +1 -1
- data/ohai.gemspec +2 -2
- data/spec/data/plugins/rpmquery.output +0 -2
- data/spec/functional/application_spec.rb +1 -1
- data/spec/functional/loader_spec.rb +2 -2
- data/spec/functional/plugins/powershell_spec.rb +2 -2
- data/spec/functional/plugins/root_group_spec.rb +1 -1
- data/spec/functional/plugins/windows/uptime_spec.rb +2 -2
- data/spec/ohai_spec.rb +1 -1
- data/spec/unit/application_spec.rb +1 -1
- data/spec/unit/config_spec.rb +1 -1
- data/spec/unit/dsl/plugin_spec.rb +1 -1
- data/spec/unit/hints_spec.rb +2 -2
- data/spec/unit/loader_spec.rb +12 -12
- data/spec/unit/mixin/azure_metadata_spec.rb +1 -1
- data/spec/unit/mixin/command_spec.rb +1 -1
- data/spec/unit/mixin/dmi_decode.rb +68 -0
- data/spec/unit/mixin/ec2_metadata_spec.rb +1 -1
- data/spec/unit/mixin/softlayer_metadata_spec.rb +1 -1
- data/spec/unit/plugin_config_spec.rb +1 -1
- data/spec/unit/plugins/abort_spec.rb +9 -9
- data/spec/unit/plugins/aix/cpu_spec.rb +4 -4
- data/spec/unit/plugins/aix/filesystem_spec.rb +5 -5
- data/spec/unit/plugins/aix/hostname_spec.rb +1 -1
- data/spec/unit/plugins/aix/kernel_spec.rb +1 -1
- data/spec/unit/plugins/aix/memory_spec.rb +1 -1
- data/spec/unit/plugins/aix/network_spec.rb +6 -6
- data/spec/unit/plugins/aix/platform_spec.rb +1 -1
- data/spec/unit/plugins/aix/uptime_spec.rb +1 -1
- data/spec/unit/plugins/aix/virtualization_spec.rb +2 -2
- data/spec/unit/plugins/azure_spec.rb +1 -1
- data/spec/unit/plugins/bsd/filesystem_spec.rb +4 -4
- data/spec/unit/plugins/bsd/virtualization_spec.rb +3 -3
- data/spec/unit/plugins/c_spec.rb +1 -53
- data/spec/unit/plugins/chef_spec.rb +1 -1
- data/spec/unit/plugins/cloud_spec.rb +1 -1
- data/spec/unit/plugins/darwin/cpu_spec.rb +2 -2
- data/spec/unit/plugins/darwin/filesystem_spec.rb +5 -5
- data/spec/unit/plugins/darwin/hardware_spec.rb +2 -2
- data/spec/unit/plugins/darwin/hardware_system_profiler_output.rb +3 -3
- data/spec/unit/plugins/darwin/hostname_spec.rb +1 -1
- data/spec/unit/plugins/darwin/kernel_spec.rb +1 -1
- data/spec/unit/plugins/darwin/memory_spec.rb +1 -1
- data/spec/unit/plugins/darwin/network_spec.rb +1 -1
- data/spec/unit/plugins/darwin/platform_spec.rb +1 -1
- data/spec/unit/plugins/darwin/virtualization_spec.rb +1 -1
- data/spec/unit/plugins/dmi_spec.rb +1 -1
- data/spec/unit/plugins/docker_spec.rb +1 -1
- data/spec/unit/plugins/ec2_spec.rb +1 -1
- data/spec/unit/plugins/elixir_spec.rb +1 -1
- data/spec/unit/plugins/erlang_spec.rb +1 -1
- data/spec/unit/plugins/eucalyptus_spec.rb +1 -1
- data/spec/unit/plugins/fail_spec.rb +28 -28
- data/spec/unit/plugins/freebsd/cpu_spec.rb +1 -1
- data/spec/unit/plugins/freebsd/hostname_spec.rb +1 -1
- data/spec/unit/plugins/freebsd/kernel_spec.rb +1 -1
- data/spec/unit/plugins/freebsd/platform_spec.rb +1 -1
- data/spec/unit/plugins/gce_spec.rb +1 -1
- data/spec/unit/plugins/go_spec.rb +1 -1
- data/spec/unit/plugins/groovy_spec.rb +1 -1
- data/spec/unit/plugins/haskell_spec.rb +1 -1
- data/spec/unit/plugins/hostname_spec.rb +68 -1
- data/spec/unit/plugins/init_package_spec.rb +1 -1
- data/spec/unit/plugins/java_spec.rb +1 -1
- data/spec/unit/plugins/joyent_spec.rb +3 -3
- data/spec/unit/plugins/kernel_spec.rb +1 -1
- data/spec/unit/plugins/linode_spec.rb +1 -1
- data/spec/unit/plugins/linux/block_device_spec.rb +1 -1
- data/spec/unit/plugins/linux/cpu_spec.rb +6 -6
- data/spec/unit/plugins/linux/filesystem_spec.rb +21 -21
- data/spec/unit/plugins/linux/fips_spec.rb +13 -45
- data/spec/unit/plugins/linux/hostname_spec.rb +1 -1
- data/spec/unit/plugins/linux/hostnamectl_spec.rb +2 -2
- data/spec/unit/plugins/linux/kernel_spec.rb +8 -8
- data/spec/unit/plugins/linux/lsb_spec.rb +3 -3
- data/spec/unit/plugins/linux/lspci_spec.rb +2 -2
- data/spec/unit/plugins/linux/machineid_spec.rb +1 -1
- data/spec/unit/plugins/linux/mdadm_spec.rb +2 -2
- data/spec/unit/plugins/linux/memory_spec.rb +26 -1
- data/spec/unit/plugins/linux/network_spec.rb +37 -37
- data/spec/unit/plugins/linux/platform_spec.rb +580 -837
- data/spec/unit/plugins/linux/sessions_spec.rb +2 -2
- data/spec/unit/plugins/linux/systemd_paths_spec.rb +1 -1
- data/spec/unit/plugins/linux/uptime_spec.rb +1 -1
- data/spec/unit/plugins/linux/virtualization_spec.rb +28 -227
- data/spec/unit/plugins/lua_spec.rb +1 -1
- data/spec/unit/plugins/mono_spec.rb +2 -2
- data/spec/unit/plugins/netbsd/hostname_spec.rb +1 -1
- data/spec/unit/plugins/netbsd/kernel_spec.rb +1 -1
- data/spec/unit/plugins/netbsd/platform_spec.rb +1 -1
- data/spec/unit/plugins/network_spec.rb +11 -11
- data/spec/unit/plugins/nodejs_spec.rb +1 -1
- data/spec/unit/plugins/ohai_spec.rb +1 -1
- data/spec/unit/plugins/ohai_time_spec.rb +1 -1
- data/spec/unit/plugins/openbsd/hostname_spec.rb +1 -1
- data/spec/unit/plugins/openbsd/kernel_spec.rb +1 -1
- data/spec/unit/plugins/openbsd/platform_spec.rb +1 -1
- data/spec/unit/plugins/openstack_spec.rb +8 -4
- data/spec/unit/plugins/os_spec.rb +1 -1
- data/spec/unit/plugins/packages_spec.rb +1 -21
- data/spec/unit/plugins/passwd_spec.rb +1 -1
- data/spec/unit/plugins/perl_spec.rb +1 -1
- data/spec/unit/plugins/php_spec.rb +6 -6
- data/spec/unit/plugins/platform_spec.rb +1 -1
- data/spec/unit/plugins/powershell_spec.rb +3 -3
- data/spec/unit/plugins/python_spec.rb +1 -1
- data/spec/unit/plugins/rackspace_spec.rb +2 -2
- data/spec/unit/plugins/root_group_spec.rb +1 -11
- data/spec/unit/plugins/ruby_spec.rb +1 -1
- data/spec/unit/plugins/rust_spec.rb +1 -1
- data/spec/unit/plugins/scala_spec.rb +1 -1
- data/spec/unit/plugins/scsi_spec.rb +2 -2
- data/spec/unit/plugins/shard_spec.rb +1 -1
- data/spec/unit/plugins/shells_spec.rb +1 -1
- data/spec/unit/plugins/softlayer_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/cpu_spec.rb +3 -3
- data/spec/unit/plugins/solaris2/dmi_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/filesystem.rb +4 -4
- data/spec/unit/plugins/solaris2/hostname_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/kernel_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/memory_spec.rb +1 -1
- data/spec/unit/plugins/solaris2/network_spec.rb +6 -6
- data/spec/unit/plugins/solaris2/platform_spec.rb +3 -3
- data/spec/unit/plugins/solaris2/virtualization_spec.rb +41 -69
- data/spec/unit/plugins/ssh_host_keys_spec.rb +3 -3
- data/spec/unit/plugins/sysconf_spec.rb +2 -2
- data/spec/unit/plugins/timezone_spec.rb +1 -1
- data/spec/unit/plugins/virtualbox_spec.rb +1 -1
- data/spec/unit/plugins/vmware_spec.rb +1 -1
- data/spec/unit/plugins/windows/cpu_spec.rb +1 -2
- data/spec/unit/plugins/windows/filesystem_spec.rb +2 -2
- data/spec/unit/plugins/windows/fips_spec.rb +17 -77
- data/spec/unit/plugins/windows/kernel_spec.rb +1 -1
- data/spec/unit/plugins/windows/memory_spec.rb +2 -2
- data/spec/unit/plugins/windows/network_spec.rb +1 -1
- data/spec/unit/plugins/windows/system_enclosure_spec.rb +1 -1
- data/spec/unit/plugins/windows/uptime_spec.rb +1 -1
- data/spec/unit/plugins/windows/virtualization_spec.rb +20 -238
- data/spec/unit/plugins/zpools_spec.rb +7 -7
- data/spec/unit/provides_map_spec.rb +1 -1
- data/spec/unit/runner_spec.rb +1 -1
- data/spec/unit/system_spec.rb +10 -77
- data/spec/unit/util/file_helper_spec.rb +1 -1
- data/spec/unit/util/ip_helper_spec.rb +1 -1
- metadata +6 -9
- data/lib/ohai/plugins/darwin/system_profiler.rb +0 -72
- data/lib/ohai/util/win32/group_helper.rb +0 -76
- data/spec/unit/plugins/darwin/system_profiler_output.rb +0 -79524
- data/spec/unit/plugins/darwin/system_profiler_spec.rb +0 -40
@@ -16,7 +16,7 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
def it_doesnt_fail
|
22
22
|
it "doesnt fail" do
|
@@ -31,17 +31,17 @@ def it_populates_ipaddress_attributes
|
|
31
31
|
source = caller[0]
|
32
32
|
|
33
33
|
it "populates ipaddress, macaddress and ip6address" do
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
end
|
41
|
-
rescue Exception
|
42
|
-
puts "RSpec context: #{source}"
|
43
|
-
raise
|
34
|
+
|
35
|
+
allow(@plugin.logger).to receive(:warn)
|
36
|
+
expect(@plugin.logger).not_to receive(:trace).with(/^Plugin network threw exception/)
|
37
|
+
@plugin.run
|
38
|
+
%w{ ipaddress macaddress ip6address }.each do |attribute|
|
39
|
+
expect(@plugin).to have_key(attribute)
|
44
40
|
end
|
41
|
+
rescue Exception
|
42
|
+
puts "RSpec context: #{source}"
|
43
|
+
raise
|
44
|
+
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
describe Ohai::System, "plugin openstack" do
|
22
22
|
|
@@ -146,7 +146,7 @@ describe Ohai::System, "plugin openstack" do
|
|
146
146
|
instance-action
|
147
147
|
aki-id
|
148
148
|
block-device-mapping/
|
149
|
-
EOM
|
149
|
+
EOM
|
150
150
|
end
|
151
151
|
|
152
152
|
let(:metadata_values) do
|
@@ -156,7 +156,8 @@ EOM
|
|
156
156
|
"public-keys/0/" => "openssh-key",
|
157
157
|
"public-keys/0/openssh-key" => "SSH KEY DATA",
|
158
158
|
"security-groups" => "default",
|
159
|
-
"public-ipv4" => "",
|
159
|
+
"public-ipv4" => "172.31.7.2",
|
160
|
+
"public-ipv6" => "",
|
160
161
|
"ami-manifest-path" => "FIXME",
|
161
162
|
"instance-type" => "opc-tester",
|
162
163
|
"instance-id" => "i-0000162a",
|
@@ -246,7 +247,10 @@ EOM
|
|
246
247
|
expect(plugin["openstack"]["security_groups"]).to eq(["default"])
|
247
248
|
end
|
248
249
|
it "reads the public_ipv4 from the metadata service" do
|
249
|
-
expect(plugin["openstack"]["public_ipv4"]).to eq("")
|
250
|
+
expect(plugin["openstack"]["public_ipv4"]).to eq("172.31.7.2")
|
251
|
+
end
|
252
|
+
it "ignore the public_ipv6 from the metadata service when empty" do
|
253
|
+
expect(plugin["openstack"]).not_to have_key("public_ipv6")
|
250
254
|
end
|
251
255
|
it "reads the ami_manifest_path from the metadata service" do
|
252
256
|
expect(plugin["openstack"]["ami_manifest_path"]).to eq("FIXME")
|
@@ -17,7 +17,7 @@
|
|
17
17
|
# limitations under the License.
|
18
18
|
#
|
19
19
|
|
20
|
-
|
20
|
+
require "spec_helper"
|
21
21
|
|
22
22
|
describe Ohai::System, "plugin packages" do
|
23
23
|
context "on debian" do
|
@@ -100,26 +100,6 @@ describe Ohai::System, "plugin packages" do
|
|
100
100
|
expect(plugin[:packages]["tzdata"][:installdate]).to eq("1463486618")
|
101
101
|
expect(plugin[:packages]["tzdata"][:arch]).to eq("noarch")
|
102
102
|
end
|
103
|
-
|
104
|
-
it "handles multiple packages with the same name" do
|
105
|
-
expect(plugin[:packages]["kernel"][:version]).to eq("3.10.0")
|
106
|
-
expect(plugin[:packages]["kernel"][:release]).to eq("862.el7")
|
107
|
-
expect(plugin[:packages]["kernel"][:epoch]).to eq("0")
|
108
|
-
expect(plugin[:packages]["kernel"][:installdate]).to eq("1521745632")
|
109
|
-
expect(plugin[:packages]["kernel"][:arch]).to eq("x86_64")
|
110
|
-
# and now the version list:
|
111
|
-
expect(plugin[:packages]["kernel"]["versions"].first[:version]).to eq("3.10.0")
|
112
|
-
expect(plugin[:packages]["kernel"]["versions"].first[:release]).to eq("862.2.3.el7")
|
113
|
-
expect(plugin[:packages]["kernel"]["versions"].first[:epoch]).to eq("0")
|
114
|
-
expect(plugin[:packages]["kernel"]["versions"].first[:installdate]).to eq("1526310781")
|
115
|
-
expect(plugin[:packages]["kernel"]["versions"].first[:arch]).to eq("x86_64")
|
116
|
-
expect(plugin[:packages]["kernel"]["versions"].last[:version]).to eq("3.10.0")
|
117
|
-
expect(plugin[:packages]["kernel"]["versions"].last[:release]).to eq("862.el7")
|
118
|
-
expect(plugin[:packages]["kernel"]["versions"].last[:epoch]).to eq("0")
|
119
|
-
expect(plugin[:packages]["kernel"]["versions"].last[:installdate]).to eq("1521745632")
|
120
|
-
expect(plugin[:packages]["kernel"]["versions"].last[:arch]).to eq("x86_64")
|
121
|
-
|
122
|
-
end
|
123
103
|
end
|
124
104
|
|
125
105
|
context "on arch" do
|
@@ -18,7 +18,7 @@
|
|
18
18
|
# limitations under the License.
|
19
19
|
#
|
20
20
|
|
21
|
-
|
21
|
+
require "spec_helper"
|
22
22
|
|
23
23
|
describe Ohai::System, "plugin php" do
|
24
24
|
let(:plugin) { get_plugin("php") }
|
@@ -29,7 +29,7 @@ describe Ohai::System, "plugin php" do
|
|
29
29
|
PHP 5.1.6 (cli) (built: Jul 16 2008 19:52:52)
|
30
30
|
Copyright (c) 1997-2006 The PHP Group
|
31
31
|
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
|
32
|
-
OUT
|
32
|
+
OUT
|
33
33
|
allow(plugin).to receive(:shell_out).with("php -v").and_return(mock_shell_out(0, @stdout, ""))
|
34
34
|
end
|
35
35
|
|
@@ -49,7 +49,7 @@ OUT
|
|
49
49
|
Copyright (c) 1997-2016 The PHP Group
|
50
50
|
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
51
51
|
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
|
52
|
-
OUT
|
52
|
+
OUT
|
53
53
|
allow(plugin).to receive(:shell_out).with("php -v").and_return(mock_shell_out(0, stdout, ""))
|
54
54
|
plugin.run
|
55
55
|
expect(plugin.languages[:php][:version]).to eql("7.0.4-7ubuntu2.1")
|
@@ -66,7 +66,7 @@ OUT
|
|
66
66
|
PHP 5.3.27 with Suhosin-Patch (cli) (built: Aug 30 2013 04:30:30)
|
67
67
|
Copyright (c) 1997-2013 The PHP Group
|
68
68
|
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
|
69
|
-
OUT
|
69
|
+
OUT
|
70
70
|
allow(plugin).to receive(:shell_out).with("php -v").and_return(mock_shell_out(0, stdout, ""))
|
71
71
|
plugin.run
|
72
72
|
expect(plugin.languages[:php][:builddate]).to eql("Aug 30 2013 04:30:30")
|
@@ -77,7 +77,7 @@ OUT
|
|
77
77
|
PHP 5.1.6 (cli) (built: Jul 16 2008 19:52:52)
|
78
78
|
Copyright (c) 1997-2006 The PHP Group
|
79
79
|
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
|
80
|
-
OUT
|
80
|
+
OUT
|
81
81
|
allow(plugin).to receive(:shell_out).with("php -v").and_return(mock_shell_out(0, stdout, ""))
|
82
82
|
plugin.run
|
83
83
|
expect(plugin.languages[:php]).not_to have_key(:zend_opcache_version)
|
@@ -89,7 +89,7 @@ OUT
|
|
89
89
|
Copyright (c) 1997-2014 The PHP Group
|
90
90
|
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
|
91
91
|
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
|
92
|
-
OUT
|
92
|
+
OUT
|
93
93
|
allow(plugin).to receive(:shell_out).with("php -v").and_return(mock_shell_out(0, stdout, ""))
|
94
94
|
plugin.run
|
95
95
|
expect(plugin.languages[:php][:zend_opcache_version]).to eql("7.0.3")
|
@@ -15,7 +15,7 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
17
|
|
18
|
-
|
18
|
+
require "spec_helper"
|
19
19
|
|
20
20
|
describe Ohai::System, "plugin powershell" do
|
21
21
|
let(:plugin) { get_plugin("powershell") }
|
@@ -42,7 +42,7 @@ describe Ohai::System, "plugin powershell" do
|
|
42
42
|
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
|
43
43
|
PSRemotingProtocolVersion 2.2
|
44
44
|
|
45
|
-
END
|
45
|
+
END
|
46
46
|
compat_version_array = ["1.0", "2.0", "3.0", "4.0"]
|
47
47
|
|
48
48
|
allow(plugin).to receive(:shell_out).with(anything).and_return(mock_shell_out(0, v4_output, ""))
|
@@ -61,7 +61,7 @@ END
|
|
61
61
|
error_output = <<~END
|
62
62
|
'powershell.exe' is not recognized as an internal or external command,
|
63
63
|
operable program or batch file.
|
64
|
-
END
|
64
|
+
END
|
65
65
|
|
66
66
|
allow(plugin).to receive(:shell_out).with(anything).and_return(mock_shell_out(1, error_output, ""))
|
67
67
|
plugin.run
|
@@ -16,7 +16,7 @@
|
|
16
16
|
#
|
17
17
|
|
18
18
|
require "resolv"
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
describe Ohai::System, "plugin rackspace" do
|
22
22
|
let(:plugin) { get_plugin("rackspace") }
|
@@ -137,7 +137,7 @@ describe Ohai::System, "plugin rackspace" do
|
|
137
137
|
server_id = "21301000"
|
138
138
|
created_at = "2012-12-06T22:08:16Z"
|
139
139
|
region = "dfw"
|
140
|
-
OUT
|
140
|
+
OUT
|
141
141
|
allow(plugin).to receive(:shell_out).with("xenstore-ls vm-data/provider_data").and_return(mock_shell_out(0, provider_data, ""))
|
142
142
|
plugin.run
|
143
143
|
expect(plugin[:rackspace][:region]).to eq("dfw")
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
describe Ohai::System, "root_group" do
|
22
22
|
before(:each) do
|
@@ -55,16 +55,6 @@ describe Ohai::System, "root_group" do
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
-
describe "platform hpux with sys group" do
|
59
|
-
before(:each) do
|
60
|
-
allow(@pwnam).to receive(:gid).and_return(3)
|
61
|
-
allow(@grgid).to receive(:name).and_return("sys")
|
62
|
-
end
|
63
|
-
it "should have a root_group of sys" do
|
64
|
-
@plugin.run
|
65
|
-
expect(@plugin[:root_group]).to eq("sys")
|
66
|
-
end
|
67
|
-
end
|
68
58
|
describe "platform aix with system group" do
|
69
59
|
before(:each) do
|
70
60
|
allow(@grgid).to receive(:name).and_return("system")
|
@@ -16,7 +16,7 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
|
19
|
+
require "spec_helper"
|
20
20
|
|
21
21
|
describe Ohai::System, "lsscsi plugin" do
|
22
22
|
let(:plugin) { get_plugin("scsi") }
|
@@ -29,7 +29,7 @@ describe Ohai::System, "lsscsi plugin" do
|
|
29
29
|
[6:2:2:0] disk LSI MR9286CV-8e 3.41 /dev/sdd
|
30
30
|
[6:2:3:0] disk LSI MR9286CV-8e 3.41 /dev/sde
|
31
31
|
[6:2:4:0] disk LSI MR9286CV-8e 3.41 /dev/sdf
|
32
|
-
LSSCSI
|
32
|
+
LSSCSI
|
33
33
|
allow(plugin).to receive(:shell_out).with("lsscsi").and_return(
|
34
34
|
mock_shell_out(0, @stdout, ""))
|
35
35
|
plugin.run
|
@@ -17,7 +17,7 @@
|
|
17
17
|
# See the License for the specific language governing permissions and
|
18
18
|
# limitations under the License.
|
19
19
|
|
20
|
-
|
20
|
+
require "spec_helper"
|
21
21
|
|
22
22
|
describe Ohai::System, "plugin softlayer" do
|
23
23
|
let(:plugin) { get_plugin("softlayer") }
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
#
|
16
16
|
|
17
|
-
|
17
|
+
require "spec_helper"
|
18
18
|
|
19
19
|
describe Ohai::System, "Solaris2.X cpu plugin" do
|
20
20
|
before(:each) do
|
@@ -441,7 +441,7 @@ describe Ohai::System, "Solaris2.X cpu plugin" do
|
|
441
441
|
cpu_info:15:cpu_info15:supported_frequencies_Hz 2925945978
|
442
442
|
cpu_info:15:cpu_info15:supported_max_cstates 1
|
443
443
|
cpu_info:15:cpu_info15:vendor_id GenuineIntel
|
444
|
-
END
|
444
|
+
END
|
445
445
|
allow(@plugin).to receive(:shell_out).with("kstat -p cpu_info").and_return(mock_shell_out(0, kstatinfo_output, ""))
|
446
446
|
@plugin.run
|
447
447
|
end
|
@@ -2807,7 +2807,7 @@ END
|
|
2807
2807
|
cpu_info:127:cpu_info127:state off-line
|
2808
2808
|
cpu_info:127:cpu_info127:state_begin 1430258903
|
2809
2809
|
cpu_info:127:cpu_info127:supported_frequencies_Hz 1648762500
|
2810
|
-
END
|
2810
|
+
END
|
2811
2811
|
allow(@plugin).to receive(:shell_out).with("kstat -p cpu_info").and_return(mock_shell_out(0, kstatinfo_output, ""))
|
2812
2812
|
@plugin.run
|
2813
2813
|
end
|