Rework os check
This change updates the way we do the os check to use the os facts rather than running facter via beaker. Change-Id: Iaee0ad6252b44ad2e2b5e6478957084c5aa18c05
This commit is contained in:
parent
256d8d3be7
commit
7c15f3039f
11
spec/acceptance/nodesets/ubuntu-server-1604-x64.yml
Normal file
11
spec/acceptance/nodesets/ubuntu-server-1604-x64.yml
Normal file
@ -0,0 +1,11 @@
|
||||
HOSTS:
|
||||
ubuntu-server-16.04-amd64:
|
||||
roles:
|
||||
- master
|
||||
platform: ubuntu-16.04-amd64
|
||||
box: puppetlabs/ubuntu-16.04-64-nocm
|
||||
box_url: https://vagrantcloud.com/puppetlabs/ubuntu-16.04-64-nocm
|
||||
hypervisor: vagrant
|
||||
CONFIG:
|
||||
log_level: debug
|
||||
type: foss
|
@ -18,11 +18,10 @@ describe 'openstack_extras::repo::*' do
|
||||
end
|
||||
|
||||
it 'should be able to install openstack packages' do
|
||||
case fact('osfamily')
|
||||
when 'Debian'
|
||||
if os[:family] == 'Debian'
|
||||
expect(shell('apt-get install -y python-openstackclient').exit_code).to be_zero
|
||||
expect(shell('apt-cache policy python-openstackclient | grep -A 1 \*\*\*').stdout).to match(/#{release}/)
|
||||
when 'Redhat'
|
||||
elsif os[:family] == 'RedHat'
|
||||
expect(shell('yum install -y python-openstackclient').exit_code).to be_zero
|
||||
expect(shell('yum list python-openstackclient | grep -A 1 "Installed Packages"').stdout).to match(/@rdo-release/)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user