From 5769653f9779b08938e1e864001805da6af71550 Mon Sep 17 00:00:00 2001 From: David RACODON Date: Wed, 29 Jul 2015 10:08:26 +0200 Subject: [PATCH] Remove support of old SonarQube versions (<4.0). They are more than two years old and no longer supported. Removes code to ease maintenance. --- manifests/init.pp | 7 +------ spec/acceptance/sonarqube_system_spec.rb | 12 +----------- spec/classes/init_spec.rb | 9 ++------- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 19162096..45c2ad1e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -52,12 +52,7 @@ # wget from https://github.com/maestrodev/puppet-wget include wget - if versioncmp($version, '4.0') < 0 { - $package_name = 'sonar' - } - else { - $package_name = 'sonarqube' - } + $package_name = 'sonarqube' if $home != undef { $real_home = $home diff --git a/spec/acceptance/sonarqube_system_spec.rb b/spec/acceptance/sonarqube_system_spec.rb index 969131a8..c35a2a8d 100644 --- a/spec/acceptance/sonarqube_system_spec.rb +++ b/spec/acceptance/sonarqube_system_spec.rb @@ -31,7 +31,7 @@ class { 'sonarqube': end context 'when installing version 4' do - let(:version) { '4.1.2' } + let(:version) { '4.5.4' } it_should_behave_like :sonar @@ -57,14 +57,4 @@ class { 'sonarqube' : end end - context 'when installing version 3' do - let(:version) { '3.7.4' } - - before(:all) do - on(hosts, "service sonar stop && rm -rf /etc/init.d/sonar* #{installroot}* #{home}*") - end - - it_should_behave_like :sonar - end - end diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 7bcca10a..14fc6231 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -4,14 +4,9 @@ let(:sonar_properties) { '/usr/local/sonar/conf/sonar.properties' } - context "when installing version 3", :compile do - let(:params) {{ :version => '3.7.4' }} - it { should contain_wget__fetch('download-sonar').with_source('http://downloads.sonarsource.com/sonarqube/sonar-3.7.4.zip') } - end - context "when installing version 4", :compile do - let(:params) {{ :version => '4.1.2' }} - it { should contain_wget__fetch('download-sonar').with_source('http://downloads.sonarsource.com/sonarqube/sonarqube-4.1.2.zip') } + let(:params) {{ :version => '4.5.4' }} + it { should contain_wget__fetch('download-sonar').with_source('http://downloads.sonarsource.com/sonarqube/sonarqube-4.5.4.zip') } end context "when crowd configuration is supplied", :compile do