]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/cinder/spec/defines/cinder_type_spec.rb
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / cinder / spec / defines / cinder_type_spec.rb
1 #Author: Andrew Woodward <awoodward@mirantis.com>
2
3 require 'spec_helper'
4
5 describe 'cinder::type' do
6
7   let(:title) {'hippo'}
8
9   let :params do {
10     :set_value      => ['name1','name2'],
11     :set_key        => 'volume_backend_name',
12     :os_password    => 'asdf',
13     :os_tenant_name => 'admin',
14     :os_username    => 'admin',
15     :os_auth_url    => 'http://127.127.127.1:5000/v2.0/',
16   }
17   end
18
19   it 'should have its execs' do
20     should contain_exec('cinder type-create hippo').with(
21       :command => 'cinder type-create hippo',
22       :environment => [
23         'OS_TENANT_NAME=admin',
24         'OS_USERNAME=admin',
25         'OS_PASSWORD=asdf',
26         'OS_AUTH_URL=http://127.127.127.1:5000/v2.0/'],
27       :unless  => "cinder type-list | grep -qP '\\bhippo\\b'",
28       :require => 'Package[python-cinderclient]')
29     should contain_exec('cinder type-key hippo set volume_backend_name=name1')
30     should contain_exec('cinder type-key hippo set volume_backend_name=name2')
31   end
32 end