Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Commit

Permalink
Merge pull request #37 from maestrodev/feature/Remove_support_of_old_…
Browse files Browse the repository at this point in the history
…SonarQube_versions

Remove support of old SonarQube versions (<4.0)
  • Loading branch information
racodond committed Jul 29, 2015
2 parents 2f33173 + d790105 commit f8133d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
7 changes: 1 addition & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 1 addition & 11 deletions spec/acceptance/sonarqube_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
9 changes: 2 additions & 7 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f8133d3

Please sign in to comment.