[ARVADOS] updated: 3c068341659783d0d7132f92b14c05c07830d5b2
git at public.curoverse.com
git at public.curoverse.com
Mon Aug 17 11:31:23 EDT 2015
Summary of changes:
services/api/lib/salvage_collection.rb | 3 ++-
services/api/test/unit/salvage_collection_test.rb | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
via 3c068341659783d0d7132f92b14c05c07830d5b2 (commit)
from a25971cae157b6bc40037e391db226da36dc9b30 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 3c068341659783d0d7132f92b14c05c07830d5b2
Author: radhika <radhika at curoverse.com>
Date: Mon Aug 17 11:28:24 2015 -0400
6859: observed that an exit from test running is captured and misinterpreted by the Kernel.exit mock method. Hence, update salvage_collection to exit with code 200, which is outside the range of special exit codes. http://tldp.org/LDP/abs/html/exitcodes.htmla
diff --git a/services/api/lib/salvage_collection.rb b/services/api/lib/salvage_collection.rb
index e5420f1..80b96b8 100755
--- a/services/api/lib/salvage_collection.rb
+++ b/services/api/lib/salvage_collection.rb
@@ -19,7 +19,8 @@ module SalvageCollection
act_as_system_user do
if !ENV['ARVADOS_API_TOKEN'].present? or !ENV['ARVADOS_API_HOST'].present?
$stderr.puts "Please set your admin user credentials as ARVADOS environment variables."
- exit 1
+ # exit with a code outside the range of special exit codes; http://tldp.org/LDP/abs/html/exitcodes.html
+ exit 200
end
if !uuid.present?
diff --git a/services/api/test/unit/salvage_collection_test.rb b/services/api/test/unit/salvage_collection_test.rb
index 09ab6cf..dfc55ba 100644
--- a/services/api/test/unit/salvage_collection_test.rb
+++ b/services/api/test/unit/salvage_collection_test.rb
@@ -20,7 +20,7 @@ module Kernel
end
def exit code
- raise "Exit code #{code}" if code != 0
+ raise "Exit code #{code}" if code == 200
end
end
@@ -81,7 +81,7 @@ class SalvageCollectionTest < ActiveSupport::TestCase
ENV['ARVADOS_API_TOKEN'] = ''
SalvageCollection.salvage_collection collections('user_agreement').uuid
rescue => e
- assert_equal "Exit code 1", e.message
+ assert_equal "Exit code 200", e.message
exited = true
end
assert_equal true, exited
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list