Files
puppet-cinder/spec/acceptance/10_basic_cinder_spec.rb
Takashi Kajinami 2c0b027dfc Convert measurable attributes to properties
The parameters are used for values which affects how puppet interact
with the resource, while the properties should be used for values which
can be measured in the target system.

This allows us to make sure that these values are actually synced with
the existing resources.

Change-Id: Ie62c898f7d029caff797fd9eba4c5ddb36a90b78
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-10-03 22:45:15 +09:00

63 lines
1.5 KiB
Ruby

require 'spec_helper_acceptance'
describe 'basic cinder' do
context 'default parameters' do
it 'should work with no errors' do
pp= <<-EOS
include openstack_integration
include openstack_integration::repos
include openstack_integration::apache
include openstack_integration::rabbitmq
include openstack_integration::mysql
include openstack_integration::memcached
include openstack_integration::keystone
include openstack_integration::cinder
cinder_type { 'testvolumetype' :
properties => {
'k' => 'v',
'key1' => 'val1',
'key2' => '<is> True'
}
}
cinder_type { 'qostype1':
ensure => present
}
cinder_type { 'qostype2':
ensure => present
}
cinder_qos { 'testqos1':
properties => {
'key1' => 'val1',
'key2' => 'val2',
}
}
cinder_qos { 'testqos2':
associations => ['qostype1', 'qostype2']
}
cinder_qos { 'testqos3':
consumer => 'front-end',
}
EOS
# Run it twice to test for idempotency
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
describe port(8776) do
it { is_expected.to be_listening }
end
describe cron do
it { is_expected.to have_entry('1 0 * * * cinder-manage db purge 30 >>/var/log/cinder/cinder-rowsflush.log 2>&1').with_user('cinder') }
end
end
end