[ARVADOS] updated: 840e7d7f96f763ae139545dca5d6dfa5a54f6cc6
git at public.curoverse.com
git at public.curoverse.com
Wed Apr 30 03:02:59 EDT 2014
Summary of changes:
.../app/controllers/arvados/v1/nodes_controller.rb | 2 +-
services/api/app/models/node.rb | 2 +-
.../functional/arvados/v1/nodes_controller_test.rb | 9 +++++++++
3 files changed, 11 insertions(+), 2 deletions(-)
via 840e7d7f96f763ae139545dca5d6dfa5a54f6cc6 (commit)
from 8adde5132926e8f9cc1b01d79f9307614cc6021e (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 840e7d7f96f763ae139545dca5d6dfa5a54f6cc6
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Apr 30 03:00:16 2014 -0400
Fix route name in nodes.create, add basic functional test.
diff --git a/services/api/app/controllers/arvados/v1/nodes_controller.rb b/services/api/app/controllers/arvados/v1/nodes_controller.rb
index d7a477d..990397b 100644
--- a/services/api/app/controllers/arvados/v1/nodes_controller.rb
+++ b/services/api/app/controllers/arvados/v1/nodes_controller.rb
@@ -6,7 +6,7 @@ class Arvados::V1::NodesController < ApplicationController
def create
@object = Node.new
@object.save!
- @object.start!(lambda { |h| arvados_v1_ping_node_url(h) })
+ @object.start!(lambda { |h| ping_arvados_v1_node_url(h) })
show
end
diff --git a/services/api/app/models/node.rb b/services/api/app/models/node.rb
index 805e1cc..b88d4a5 100644
--- a/services/api/app/models/node.rb
+++ b/services/api/app/models/node.rb
@@ -120,7 +120,7 @@ class Node < ArvadosModel
def start!(ping_url_method)
ensure_permission_to_update
- ping_url = ping_url_method.call({ uuid: self.uuid, ping_secret: self.info[:ping_secret] })
+ ping_url = ping_url_method.call({ id: self.uuid, ping_secret: self.info[:ping_secret] })
if (Rails.configuration.compute_node_ec2run_args and
Rails.configuration.compute_node_ami)
ec2_args = ["--user-data '#{ping_url}'",
diff --git a/services/api/test/functional/arvados/v1/nodes_controller_test.rb b/services/api/test/functional/arvados/v1/nodes_controller_test.rb
index 386c839..e096a04 100644
--- a/services/api/test/functional/arvados/v1/nodes_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/nodes_controller_test.rb
@@ -66,4 +66,13 @@ class Arvados::V1::NodesControllerTest < ActionController::TestCase
assert_response 401
end
+ test "create node" do
+ authorize_with :admin
+ post :create
+ assert_response :success
+ assert_not_nil json_response['uuid']
+ assert_not_nil json_response['info'].is_a? Hash
+ assert_not_nil json_response['info']['ping_secret']
+ end
+
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list