forked from cloudfoundry-attic/vcap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert tomcat.zip change that introduced a digest in the archive (and the corresponding BVT addition) in preference to a more effective unit test described below. Also fix an incomplete test description. We now save a SHA1 digest of the tomcat.zip resulting from running the update / upgrade script (see vcap-java/tomcat-setup) and use a unit test (included in this change) to verify that the SHA1 digest of the 'tomcat.zip' used by the CloudController matches the saved SHA1 thus helping us prevent out-of-band (to the update script) updates to the tomcat.zip used by the CloudController. Updated to include this change in the new staging gem. Before this change can be actually merged, an update to the 'java' submodule reference is needed. That will be part of a different commit. (This is now done) - Included in the new staging gem. - Updated vcap_staging gem in vendor cache in 'stager' Change-Id: I4006c1d04dc307a7b4c17362b565de93aa4971f9
- Loading branch information
AB Srinivasan
committed
Sep 13, 2011
1 parent
8a8ebdc
commit d8cbea0
Showing
8 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+21 MB
stager/vendor/cache/vcap_staging-0.1.0.gem → ...oller/vendor/cache/vcap_staging-0.1.4.gem
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+21 MB
...oller/vendor/cache/vcap_staging-0.1.3.gem → stager/vendor/cache/vcap_staging-0.1.4.gem
Binary file not shown.
Binary file modified
BIN
-550 Bytes
(100%)
staging/lib/vcap/staging/plugin/java_web/resources/tomcat.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module VCAP | ||
module Staging | ||
VERSION = '0.1.3' | ||
VERSION = '0.1.4' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |