Skip to content

Commit

Permalink
Store a symlink to the *.spec.sig file next to the *.spec file itself…
Browse files Browse the repository at this point in the history
…, so that we don't need to traverse the URL in the *.spec file until we've actually validated it.

Bug-ID: 878
  • Loading branch information
Eric Kidd committed Dec 1, 2007
1 parent bbaba0e commit a3ec514
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions update_server_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,7 @@ def populate_pool
def symlink_staging_spec
ln_sf((@manifest_dir + "release.spec").expand_path,
@dest + "staging.spec")
ln_sf((@manifest_dir + "release.spec.sig").expand_path,
@dest + "staging.spec.sig")
end
end
4 changes: 4 additions & 0 deletions update_server_installer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_server_installer_base
assert_include manifest_dir.entries, Pathname.new("MANIFEST.sub")

assert (root+"staging.spec").exist? # check that it points to something
assert (root+"staging.spec.sig").exist? # check that it points to something
assert_equal <<EOF, (root+"staging.spec").read
Update-URL: http://www.example.com/updates/
Build: base
Expand All @@ -63,6 +64,7 @@ def test_server_installer_update
# Simulate actually releasing an update, which consists of copying
# staging.spec to release.spec
copy_entry root + "staging.spec", root + "release.spec"
copy_entry root + "staging.spec.sig", root + "release.spec.sig"

update_installer = UpdateServerInstaller.new("updater-fixtures/update",
"test_build_tmp")
Expand All @@ -86,6 +88,7 @@ def test_server_installer_update
assert_include update_manifest_dir.entries, Pathname.new("MANIFEST.sub")

assert (root+"release.spec").exist? # check that it points to something
assert (root+"release.spec.sig").exist? # check that it points to something
assert_equal <<EOF, (root+"release.spec").read
Update-URL: http://www.example.com/updates/
Build: base
Expand All @@ -95,6 +98,7 @@ def test_server_installer_update
EOF

assert (root+"staging.spec").exist? # check that it points to something
assert (root+"staging.spec.sig").exist? # check that it points to something
assert_equal <<EOF, (root+"staging.spec").read
Update-URL: http://www.example.com/updates/
Build: update
Expand Down

0 comments on commit a3ec514

Please sign in to comment.