[ARVADOS] updated: 2ca21f88dacbf378e39972818e5eb684ce86ab71
Git user
git at public.curoverse.com
Thu Nov 3 14:22:46 EDT 2016
Summary of changes:
apps/workbench/test/integration/pipeline_instances_test.rb | 13 ++++++++++---
services/api/test/unit/log_test.rb | 10 +++++-----
2 files changed, 15 insertions(+), 8 deletions(-)
via 2ca21f88dacbf378e39972818e5eb684ce86ab71 (commit)
via 0ff184a7057419a93623ac650acdb57ce80898c4 (commit)
from 0e98d5f2f9c827deb5beb4a1765a4718d7cffd88 (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 2ca21f88dacbf378e39972818e5eb684ce86ab71
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Nov 3 14:20:44 2016 -0400
10224: Workaround Firefox failure to parse localized dates in metric locales.
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index d97850c..171580b 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -16,14 +16,21 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
# Note: Even with all this help, phantomjs seem to behave badly
# when parsing timestamps on the other side of a DST transition.
# See skipped tests below.
+
+ # In some locales (e.g., en_CA.UTF-8) Firefox can't parse what its
+ # own toLocaleString() puts out.
+ t.sub!(/(\d\d\d\d)-(\d\d)-(\d\d)/, '\2/\3/\1')
+
if /(\d+:\d+ [AP]M) (\d+\/\d+\/\d+)/ =~ t
# Currently dates.js renders timestamps as
# '{t.toLocaleTimeString()} {t.toLocaleDateString()}' which even
- # browsers can't make sense of. First we need to flip it around
- # so it looks like what toLocaleString() would have made.
+ # en_US browsers can't make sense of. First we need to flip it
+ # around so it looks like what toLocaleString() would have made.
t = $~[2] + ', ' + $~[1]
end
- DateTime.parse(page.evaluate_script "new Date('#{t}').toUTCString()").to_time
+
+ utc = page.evaluate_script("new Date('#{t}').toUTCString()")
+ DateTime.parse(utc).to_time
end
if false
commit 0ff184a7057419a93623ac650acdb57ce80898c4
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Nov 3 10:10:14 2016 -0400
10224: Update tests to expect event_type="delete".
diff --git a/services/api/test/unit/log_test.rb b/services/api/test/unit/log_test.rb
index 632271e..efbb189 100644
--- a/services/api/test/unit/log_test.rb
+++ b/services/api/test/unit/log_test.rb
@@ -6,7 +6,7 @@ class LogTest < ActiveSupport::TestCase
EVENT_TEST_METHODS = {
:create => [:created_at, :assert_nil, :assert_not_nil],
:update => [:modified_at, :assert_not_nil, :assert_not_nil],
- :destroy => [nil, :assert_not_nil, :assert_nil],
+ :delete => [nil, :assert_not_nil, :assert_nil],
}
setup do
@@ -116,7 +116,7 @@ class LogTest < ActiveSupport::TestCase
orig_attrs = auth.attributes
orig_attrs.delete 'api_token'
auth.destroy
- assert_logged(auth, :destroy) do |props|
+ assert_logged(auth, :delete) do |props|
assert_equal(orig_etag, props['old_etag'], "destroyed auth etag mismatch")
assert_equal(orig_attrs, props['old_attributes'],
"destroyed auth attributes mismatch")
@@ -230,7 +230,7 @@ class LogTest < ActiveSupport::TestCase
auth.save!
assert_logged_with_clean_properties(auth, :update, 'api_token')
auth.destroy
- assert_logged_with_clean_properties(auth, :destroy, 'api_token')
+ assert_logged_with_clean_properties(auth, :delete, 'api_token')
end
test "use ownership and permission links to determine which logs a user can see" do
@@ -283,7 +283,7 @@ class LogTest < ActiveSupport::TestCase
coll.save!
assert_logged_with_clean_properties(coll, :update, 'manifest_text')
coll.destroy
- assert_logged_with_clean_properties(coll, :destroy, 'manifest_text')
+ assert_logged_with_clean_properties(coll, :delete, 'manifest_text')
end
end
@@ -302,7 +302,7 @@ class LogTest < ActiveSupport::TestCase
assert_equal(txt, props['new_attributes']['manifest_text'])
end
coll.destroy
- assert_logged(coll, :destroy) do |props|
+ assert_logged(coll, :delete) do |props|
assert_equal(txt, props['old_attributes']['manifest_text'])
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list