From cca209f8b1fb37c611194030ba0701ab2a4134aa Mon Sep 17 00:00:00 2001 From: Gael Chamoulaud Date: Wed, 9 Jul 2014 11:52:25 +0200 Subject: [PATCH] Fixes Facts string comparisons in CentOS 7 - CentOS Project has adopted a new rule for versioning numbers. The major number matches the RHEL major number, but the minor number is generated from the release date. For example, CentOS 7.0.1407. - Adds Support for Scientific Linux. Change-Id: I3220206aa01b9f5c838e524b3fec723c92435153 Closes-Bug: 1338777 Signed-off-by: Gael Chamoulaud --- .../ceilometer_agent_notification_spec.rb | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/spec/classes/ceilometer_agent_notification_spec.rb b/spec/classes/ceilometer_agent_notification_spec.rb index a7ad76e..f5bfe18 100644 --- a/spec/classes/ceilometer_agent_notification_spec.rb +++ b/spec/classes/ceilometer_agent_notification_spec.rb @@ -84,9 +84,9 @@ describe 'ceilometer::agent::notification' do context 'on RHEL 7' do let :facts do - { :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => 7 + { :osfamily => 'RedHat', + :operatingsystem => 'RedHat', + :operatingsystemmajrelease => 7 } end @@ -100,9 +100,25 @@ describe 'ceilometer::agent::notification' do context 'on CentOS 7' do let :facts do - { :osfamily => 'RedHat', - :operatingsystem => 'CentOS', - :operatingsystemrelease => 7 + { :osfamily => 'RedHat', + :operatingsystem => 'CentOS', + :operatingsystemmajrelease => 7 + } + end + + let :platform_params do + { :agent_notification_package_name => 'openstack-ceilometer-collector', + :agent_notification_service_name => 'openstack-ceilometer-notification' } + end + + it_configures 'ceilometer-agent-notification' + end + + context 'on Scientific 7' do + let :facts do + { :osfamily => 'RedHat', + :operatingsystem => 'Scientific', + :operatingsystemmajrelease => 7 } end @@ -116,8 +132,8 @@ describe 'ceilometer::agent::notification' do context 'on Fedora 20' do let :facts do - { :osfamily => 'RedHat', - :operatingsystem => 'Fedora', + { :osfamily => 'RedHat', + :operatingsystem => 'Fedora', :operatingsystemrelease => 20 } end -- 2.45.2