Files
cookbook-openstack-object-s…/spec/disks_spec.rb
Christopher H. Laco 6b3218d125 Update specs to be rubocop compliant
- Update rubocop config to include specs/**
- Update specs to comply with rubocop

Change-Id: I50734daada5c8fb3a40e8e9e02b0732843dc1d9b
Implements: blueprint rubocop-for-object-storage
2014-02-07 10:56:25 -05:00

44 lines
1.4 KiB
Ruby

# encoding: UTF-8
require_relative 'spec_helper'
describe 'openstack-object-storage::disks' do
#-------------------
# UBUNTU
#-------------------
describe 'ubuntu' do
before do
swift_stubs
@chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS
@node = @chef_run.node
@node.set['platform_family'] = 'debian'
@node.set['lsb']['codename'] = 'precise'
@node.set['swift']['release'] = 'havana'
@node.set['swift']['authmode'] = 'swauth'
@node.set['swift']['git_builder_ip'] = '10.0.0.10'
@node.set['swift']['disk_enum_expr'] = "[{ 'sda' => {}}]"
@node.set['swift']['disk_test_filter'] = ['candidate =~ /sd[^a]/ or candidate =~ /hd[^a]/ or candidate =~ /vd[^a]/ or candidate =~ /xvd[^a]/',
"File.exist?('/dev/' + candidate)",
"not system('/sbin/parted /dev/' + candidate + ' -s print | grep linux-swap')",
"not info.has_key?('removable') or info['removable'] == 0.to_s"]
# mock out an interface on the storage node
@node.set['network'] = MOCK_NODE_NETWORK_DATA['network']
@chef_run.converge 'openstack-object-storage::disks'
end
it 'installs xfs progs package' do
expect(@chef_run).to install_package 'xfsprogs'
end
it 'installs parted package' do
expect(@chef_run).to install_package 'parted'
end
end
end