|
21 | 21 |
|
22 | 22 | shared_examples_for 'ceilometer-polling' do |
23 | 23 |
|
24 | | - it { should contain_class('ceilometer::params') } |
| 24 | + it { is_expected.to contain_class('ceilometer::params') } |
25 | 25 |
|
26 | 26 | context 'when compute_namespace => true' do |
27 | 27 | it 'adds ceilometer user to nova group and, if required, to libvirt group' do |
28 | 28 | if platform_params[:libvirt_group] |
29 | | - should contain_user('ceilometer').with_groups(['nova', "#{platform_params[:libvirt_group]}"]) |
| 29 | + is_expected.to contain_user('ceilometer').with_groups(['nova', "#{platform_params[:libvirt_group]}"]) |
30 | 30 | else |
31 | | - should contain_user('ceilometer').with_groups('nova') |
| 31 | + is_expected.to contain_user('ceilometer').with_groups('nova') |
32 | 32 | end |
33 | 33 | end |
34 | 34 |
|
35 | 35 | it 'ensures nova-common is installed before the package ceilometer-common' do |
36 | | - should contain_package('nova-common').with( |
| 36 | + is_expected.to contain_package('nova-common').with( |
37 | 37 | :before => /Package\[ceilometer-common\]/ |
38 | 38 | ) |
39 | 39 | end |
40 | 40 |
|
41 | 41 | it 'configures nova notification driver' do |
42 | | - should contain_file_line_after('nova-notification-driver-common').with( |
| 42 | + is_expected.to contain_file_line_after('nova-notification-driver-common').with( |
43 | 43 | :line => 'notification_driver=nova.openstack.common.notifier.rpc_notifier', |
44 | 44 | :path => '/etc/nova/nova.conf', |
45 | 45 | :notify => 'Service[nova-compute]' |
46 | 46 | ) |
47 | | - should contain_file_line_after('nova-notification-driver-ceilometer').with( |
| 47 | + is_expected.to contain_file_line_after('nova-notification-driver-ceilometer').with( |
48 | 48 | :line => 'notification_driver=ceilometer.compute.nova_notifier', |
49 | 49 | :path => '/etc/nova/nova.conf', |
50 | 50 | :notify => 'Service[nova-compute]' |
|
53 | 53 | end |
54 | 54 |
|
55 | 55 | it 'installs ceilometer-polling package' do |
56 | | - should contain_package('ceilometer-polling').with( |
| 56 | + is_expected.to contain_package('ceilometer-polling').with( |
57 | 57 | :ensure => 'latest', |
58 | 58 | :name => platform_params[:agent_package_name], |
59 | 59 | :before => /Service\[ceilometer-polling\]/, |
|
62 | 62 | end |
63 | 63 |
|
64 | 64 | it 'configures central agent' do |
65 | | - should contain_ceilometer_config('DEFAULT/polling_namespaces').with_value('central,compute,ipmi') |
| 65 | + is_expected.to contain_ceilometer_config('DEFAULT/polling_namespaces').with_value('central,compute,ipmi') |
66 | 66 | end |
67 | 67 |
|
68 | 68 | it 'ensures ceilometer-common is installed before the service' do |
69 | | - should contain_package('ceilometer-common').with( |
| 69 | + is_expected.to contain_package('ceilometer-common').with( |
70 | 70 | :before => /Service\[ceilometer-polling\]/ |
71 | 71 | ) |
72 | 72 | end |
|
78 | 78 | end |
79 | 79 |
|
80 | 80 | it 'configures ceilometer-polling service' do |
81 | | - should contain_service('ceilometer-polling').with( |
| 81 | + is_expected.to contain_service('ceilometer-polling').with( |
82 | 82 | :ensure => (params[:manage_service] && params[:enabled]) ? 'running' : 'stopped', |
83 | 83 | :name => platform_params[:agent_service_name], |
84 | 84 | :enable => params[:enabled], |
|
97 | 97 | end |
98 | 98 |
|
99 | 99 | it 'configures ceilometer-polling service' do |
100 | | - should contain_service('ceilometer-polling').with( |
| 100 | + is_expected.to contain_service('ceilometer-polling').with( |
101 | 101 | :ensure => nil, |
102 | 102 | :name => platform_params[:agent_service_name], |
103 | 103 | :enable => false, |
|
108 | 108 | end |
109 | 109 |
|
110 | 110 | it 'configures central agent' do |
111 | | - should contain_ceilometer_config('coordination/backend_url').with_value( params[:coordination_url] ) |
| 111 | + is_expected.to contain_ceilometer_config('coordination/backend_url').with_value( params[:coordination_url] ) |
112 | 112 | end |
113 | 113 |
|
114 | 114 | end |
|
0 commit comments