File: 10_basic_cinder_spec.rb

package info (click to toggle)
puppet-module-cinder 27.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,512 kB
  • sloc: ruby: 6,697; python: 33; sh: 10; makefile: 10
file content (62 lines) | stat: -rw-r--r-- 1,518 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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