Showing with 45 additions and 6 deletions.
  1. +9 −0 CHANGELOG.md
  2. +1 −1 manifests/instance.pp
  3. +1 −1 metadata.json
  4. +11 −1 spec/acceptance/acceptance_1_spec.rb
  5. +12 −2 spec/acceptance/acceptance_2_spec.rb
  6. +11 −1 spec/acceptance/acceptance_3_spec.rb
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
##2014-09-04 - Supported Release 1.0.1
###Summary

This is a bugfix release.

###Bugfixes
- Fix typo in tomcat::instance
- Update acceptance tests for new tomcat releases

##2014-08-27 - Supported Release 1.0.0
###Summary

Expand Down
2 changes: 1 addition & 1 deletion manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
catalina_base => $_catalina_base,
source_url => $source_url,
source_strip_first_dir => $source_strip,
require => File[$catalina_base],
require => File[$_catalina_base],
}
} else {
tomcat::instance::package { $package_name:
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-tomcat",
"version": "1.0.0",
"version": "1.0.1",
"author": "puppetlabs",
"summary": "Puppet module for managing Apache Tomcat.",
"license": "Apache 2.0",
Expand Down
12 changes: 11 additions & 1 deletion spec/acceptance/acceptance_1_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
stop_test = false
stop_test = true if UNSUPPORTED_PLATFORMS.any?{ |up| fact('osfamily') == up} || confine_array.any?

tcat_version = String.new
shell('curl http://tomcat.apache.org/download-80.cgi?Preferred=http%3A%2F%2Fmirror.nexcess.net%2Fapache%2F', :acceptable_exit_codes => 0) do |r|
/apache-tomcat-(.{4,7}).tar.gz/.match(r.stdout).to_a.uniq.each do |m|
if m.length < 7
tcat_version = m
break
end
end
end

describe 'Acceptance case one', :unless => stop_test do

context 'Initial install Tomcat and verification' do
Expand All @@ -29,7 +39,7 @@
}
tomcat::instance { 'tomcat_one':
source_url => 'http://mirror.nexcess.net/apache/tomcat/tomcat-8/v8.0.9/bin/apache-tomcat-8.0.9.tar.gz',
source_url => "http://mirror.nexcess.net/apache/tomcat/tomcat-8/v#{tcat_version}/bin/apache-tomcat-#{tcat_version}.tar.gz",
catalina_base => '/opt/apache-tomcat/tomcat8-jsvc',
}->
staging::extract { 'commons-daemon-native.tar.gz':
Expand Down
14 changes: 12 additions & 2 deletions spec/acceptance/acceptance_2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

stop_test = true if UNSUPPORTED_PLATFORMS.any?{ |up| fact('osfamily') == up}

tcat_version = String.new
shell('curl http://tomcat.apache.org/download-60.cgi?Preferred=http%3A%2F%2Fmirror.symnds.com%2Fsoftware%2FApache%2F', :acceptable_exit_codes => 0) do |r|
/apache-tomcat-(.{4,7}).tar.gz/.match(r.stdout).to_a.uniq.each do |m|
if m.length < 7
tcat_version = m
break
end
end
end

describe 'Two different instances of Tomcat 6 in the same manifest', :unless => stop_test do

context 'Initial install Tomcat and verification' do
Expand All @@ -10,7 +20,7 @@
class { 'tomcat':}
class { 'java':}
tomcat::instance { 'tomcat6':
source_url => 'http://mirror.symnds.com/software/Apache/tomcat/tomcat-6/v6.0.41/bin/apache-tomcat-6.0.41.tar.gz',
source_url => 'http://mirror.symnds.com/software/Apache/tomcat/tomcat-6/v#{tcat_version}/bin/apache-tomcat-#{tcat_version}.tar.gz',
catalina_base => '/opt/apache-tomcat/tomcat6',
}->
tomcat::config::server { 'tomcat6':
Expand Down Expand Up @@ -43,7 +53,7 @@ class { 'java':}
}
tomcat::instance { 'tomcat6039':
source_url => 'http://mirror.symnds.com/software/Apache/tomcat/tomcat-6/v6.0.39/bin/apache-tomcat-6.0.39.tar.gz',
source_url => 'http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.39/bin/apache-tomcat-6.0.39.tar.gz',
catalina_base => '/opt/apache-tomcat/tomcat6039',
}->
tomcat::config::server { 'tomcat6039':
Expand Down
12 changes: 11 additions & 1 deletion spec/acceptance/acceptance_3_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

stop_test = true if UNSUPPORTED_PLATFORMS.any?{ |up| fact('osfamily') == up}

tcat_version = String.new
shell('curl http://tomcat.apache.org/download-70.cgi?Preferred=http%3A%2F%2Fwww.dsgnwrld.com%2Fam%2F', :acceptable_exit_codes => 0) do |r|
/apache-tomcat-(.{4,7}).tar.gz/.match(r.stdout).to_a.uniq.each do |m|
if m.length < 7
tcat_version = m
break
end
end
end

describe 'Tomcat Install source -defaults', :unless => stop_test do

shell('curl -o /tmp/sample.war https://tomcat.apache.org/tomcat-8.0-doc/appdev/sample/sample.war', :acceptable_exit_codes => 0)
Expand All @@ -12,7 +22,7 @@
class { 'tomcat':}
class { 'java':}
tomcat::instance { 'tomcat7':
source_url => 'http://www.dsgnwrld.com/am/tomcat/tomcat-7/v7.0.55/bin/apache-tomcat-7.0.55.tar.gz',
source_url => 'http://www.dsgnwrld.com/am/tomcat/tomcat-7/v#{tcat_version}/bin/apache-tomcat-#{tcat_version}.tar.gz',
catalina_base => '/opt/apache-tomcat/tomcat7',
}->
tomcat::config::server { 'tomcat7':
Expand Down