diff --git a/cloud_controller/Gemfile.lock b/cloud_controller/Gemfile.lock index 02a46d381..a276ca420 100644 --- a/cloud_controller/Gemfile.lock +++ b/cloud_controller/Gemfile.lock @@ -132,7 +132,7 @@ GEM tzinfo (0.3.26) uuidtools (2.1.2) vcap_logging (0.1.0) - vcap_staging (0.1.3) + vcap_staging (0.1.4) yajl-ruby (0.8.2) PLATFORMS diff --git a/stager/vendor/cache/vcap_staging-0.1.0.gem b/cloud_controller/vendor/cache/vcap_staging-0.1.4.gem similarity index 91% rename from stager/vendor/cache/vcap_staging-0.1.0.gem rename to cloud_controller/vendor/cache/vcap_staging-0.1.4.gem index c56fd0fdb..a23bc6c31 100644 Binary files a/stager/vendor/cache/vcap_staging-0.1.0.gem and b/cloud_controller/vendor/cache/vcap_staging-0.1.4.gem differ diff --git a/stager/Gemfile.lock b/stager/Gemfile.lock index 85d6decab..62beffc2d 100644 --- a/stager/Gemfile.lock +++ b/stager/Gemfile.lock @@ -54,7 +54,7 @@ GEM rack (>= 1.0.0) tilt (1.3.2) vcap_logging (0.1.1) - vcap_staging (0.1.0) + vcap_staging (0.1.4) vegas (0.1.8) rack (>= 1.0.0) webmock (1.6.4) diff --git a/cloud_controller/vendor/cache/vcap_staging-0.1.3.gem b/stager/vendor/cache/vcap_staging-0.1.4.gem similarity index 91% rename from cloud_controller/vendor/cache/vcap_staging-0.1.3.gem rename to stager/vendor/cache/vcap_staging-0.1.4.gem index e91d1f99e..520336d4e 100644 Binary files a/cloud_controller/vendor/cache/vcap_staging-0.1.3.gem and b/stager/vendor/cache/vcap_staging-0.1.4.gem differ diff --git a/staging/lib/vcap/staging/plugin/java_web/resources/tomcat.zip b/staging/lib/vcap/staging/plugin/java_web/resources/tomcat.zip index b4e58e4ce..d685ebed5 100644 Binary files a/staging/lib/vcap/staging/plugin/java_web/resources/tomcat.zip and b/staging/lib/vcap/staging/plugin/java_web/resources/tomcat.zip differ diff --git a/staging/lib/vcap/staging/version.rb b/staging/lib/vcap/staging/version.rb index 308186997..8083df1a4 100644 --- a/staging/lib/vcap/staging/version.rb +++ b/staging/lib/vcap/staging/version.rb @@ -1,5 +1,5 @@ module VCAP module Staging - VERSION = '0.1.3' + VERSION = '0.1.4' end end diff --git a/staging/spec/unit/java_web_spec.rb b/staging/spec/unit/java_web_spec.rb index 54837ea08..ea4baeb55 100644 --- a/staging/spec/unit/java_web_spec.rb +++ b/staging/spec/unit/java_web_spec.rb @@ -11,7 +11,7 @@ end end -describe "A Java web being staged " do +describe "A Java web application being staged " do before(:all) do app_fixture :java_web end diff --git a/staging/spec/unit/tomcat_spec.rb b/staging/spec/unit/tomcat_spec.rb new file mode 100644 index 000000000..bc6d07535 --- /dev/null +++ b/staging/spec/unit/tomcat_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' +require 'fileutils' +require 'digest/sha1' + +describe "Cloud Foundry Tomcat contents fingerprint verification" do + + CF_TOMCAT_SHA1_REL_PATH = "../../../java/tomcat-setup/cf-tomcat.zip.sha1" + it "should match the saved fingerprint generated by the Tomcat update script" do + tomcat_path = File.join(File.dirname(__FILE__), + "../../lib/vcap/staging/plugin/java_web/resources") + tomcat_zip = File.join(tomcat_path, "tomcat.zip") + digest = Digest::SHA1.hexdigest(File.read(tomcat_zip)) + + saved_digest_file = File.join(File.dirname(__FILE__), CF_TOMCAT_SHA1_REL_PATH) + saved_digest = IO.readlines(saved_digest_file)[0].split[0] + + digest.should == saved_digest + end +end