[ARVADOS] updated: e1e05845b74ce70712e414830f992ce57d7a8453
Git user
git at public.curoverse.com
Tue Mar 28 13:36:46 EDT 2017
Summary of changes:
services/api/app/controllers/arvados/v1/nodes_controller.rb | 6 +++---
.../functional/arvados/v1/virtual_machines_controller_test.rb | 4 ++--
services/api/test/test_helper.rb | 8 ++++++++
services/api/test/unit/workflow_test.rb | 8 ++++----
4 files changed, 17 insertions(+), 9 deletions(-)
via e1e05845b74ce70712e414830f992ce57d7a8453 (commit)
via 78ff2a600b29f05f522f8e8818967dac88394fd6 (commit)
via 7fd4aa96f997a133d31b3df88a8d2f4820c5b881 (commit)
from fb7bb4c8f17a49abab40e42b7a0101cac7478d60 (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 e1e05845b74ce70712e414830f992ce57d7a8453
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Mar 28 13:33:47 2017 -0400
7709: Fix lazy splat.
diff --git a/services/api/app/controllers/arvados/v1/nodes_controller.rb b/services/api/app/controllers/arvados/v1/nodes_controller.rb
index 023d2ff..639067c 100644
--- a/services/api/app/controllers/arvados/v1/nodes_controller.rb
+++ b/services/api/app/controllers/arvados/v1/nodes_controller.rb
@@ -6,8 +6,8 @@ class Arvados::V1::NodesController < ApplicationController
include DbCurrentTime
def update
- if resource_attrs[:job_uuid]
- @object.job_readable = readable_job_uuids(resource_attrs[:job_uuid]).any?
+ if resource_attrs[:job_uuid].is_a? String
+ @object.job_readable = readable_job_uuids([resource_attrs[:job_uuid]]).any?
end
super
end
@@ -57,7 +57,7 @@ class Arvados::V1::NodesController < ApplicationController
protected
- def readable_job_uuids(*uuids)
+ def readable_job_uuids(uuids)
Job.readable_by(*@read_users).select(:uuid).where(uuid: uuids).map(&:uuid)
end
end
commit 78ff2a600b29f05f522f8e8818967dac88394fd6
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Mar 28 13:32:58 2017 -0400
7709: Dispatch assert_equal to assert_nil when needed to accommodate MT6.
diff --git a/services/api/test/test_helper.rb b/services/api/test/test_helper.rb
index 6d8fa9f..38f44c5 100644
--- a/services/api/test/test_helper.rb
+++ b/services/api/test/test_helper.rb
@@ -66,6 +66,14 @@ class ActiveSupport::TestCase
User.invalidate_permissions_cache
end
+ def assert_equal(expect, *args)
+ if expect.nil?
+ assert_nil(*args)
+ else
+ super
+ end
+ end
+
def assert_not_allowed
# Provide a block that calls a Rails boolean "true or false" success value,
# like model.save or model.destroy. This method will test that it either
commit 7fd4aa96f997a133d31b3df88a8d2f4820c5b881
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Mar 28 13:24:57 2017 -0400
7709: Use assert_nil instead of assert_equal nil.
diff --git a/services/api/test/functional/arvados/v1/virtual_machines_controller_test.rb b/services/api/test/functional/arvados/v1/virtual_machines_controller_test.rb
index 9b805af..626d7f0 100644
--- a/services/api/test/functional/arvados/v1/virtual_machines_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/virtual_machines_controller_test.rb
@@ -59,8 +59,8 @@ class Arvados::V1::VirtualMachinesControllerTest < ActionController::TestCase
get :logins, id: vm.uuid
assert_response :success
assert_equal 1, json_response['items'].length
- assert_equal nil, json_response['items'][0]['public_key']
- assert_equal nil, json_response['items'][0]['authorized_key_uuid']
+ assert_nil json_response['items'][0]['public_key']
+ assert_nil json_response['items'][0]['authorized_key_uuid']
assert_equal u.uuid, json_response['items'][0]['user_uuid']
assert_equal 'bobblogin', json_response['items'][0]['username']
end
diff --git a/services/api/test/unit/workflow_test.rb b/services/api/test/unit/workflow_test.rb
index c7c5288..29ca09b 100644
--- a/services/api/test/unit/workflow_test.rb
+++ b/services/api/test/unit/workflow_test.rb
@@ -85,8 +85,8 @@ class WorkflowTest < ActiveSupport::TestCase
definition = "more: etc"
w.update_attributes!(definition: definition)
w.reload
- assert_equal nil, w.name
- assert_equal nil, w.description
+ assert_nil w.name
+ assert_nil w.description
# Workflow name and desc set using definition yaml should be cleared
# if definition yaml is cleared
@@ -96,8 +96,8 @@ class WorkflowTest < ActiveSupport::TestCase
definition = nil
w.update_attributes!(definition: definition)
w.reload
- assert_equal nil, w.name
- assert_equal nil, w.description
+ assert_nil w.name
+ assert_nil w.description
# Workflow name and desc should be set to provided custom values
definition = "name: test name 3\ndescription: test desc 3\nother: some more"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list