Commit 7232cbcb authored by Jay Mundrawala's avatar Jay Mundrawala

Merge pull request #535 from chef/jdm/win-metadata-arch

Use windows_arch to get arch in metadata
parents d402b034 0d53223e
......@@ -108,7 +108,11 @@ module Omnibus
# @return [String]
#
def arch
Ohai['kernel']['machine']
if Ohai['platform'] == 'windows'
Config.windows_arch
else
Ohai['kernel']['machine']
end
end
#
......
......@@ -28,6 +28,16 @@ module Omnibus
end
expect(described_class.arch).to eq('x86_64')
end
context 'on windows' do
it 'returns the value of Config.windows_arch' do
stub_ohai(platform: 'windows', version: '2012R2') do |data|
data['kernel']['machine'] = 'x86_64'
end
allow(Config).to receive(:windows_arch).and_return('some_arch')
expect(described_class.arch).to eq('some_arch')
end
end
end
describe '.platform_shortname' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment