[ARVADOS] updated: 8993f82f9148553603d9d6ce5f638a253f7fce70

git at public.curoverse.com git at public.curoverse.com
Thu Mar 13 22:34:57 EDT 2014


Summary of changes:
 .../app/controllers/arvados/v1/users_controller.rb |   11 +++++++++++
 .../functional/arvados/v1/users_controller_test.rb |   15 +++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

       via  8993f82f9148553603d9d6ce5f638a253f7fce70 (commit)
      from  501db79a2d00dcd79b3cf3757f6a93ef6c1c1696 (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 8993f82f9148553603d9d6ce5f638a253f7fce70
Author: radhika chippada <radhika at radhika.curoverse>
Date:   Thu Mar 13 22:33:02 2014 -0400

    WIP - update the create action in users controller to create user object and also create the links

diff --git a/services/api/app/controllers/arvados/v1/users_controller.rb b/services/api/app/controllers/arvados/v1/users_controller.rb
index 133df0f..ee5f07a 100644
--- a/services/api/app/controllers/arvados/v1/users_controller.rb
+++ b/services/api/app/controllers/arvados/v1/users_controller.rb
@@ -87,4 +87,15 @@ class Arvados::V1::UsersController < ApplicationController
     end
     show
   end
+
+	# create method that does create user object and create the three links, similar to the serup-new-user script.
+	# work in progress
+  def create
+    @object = User.create (params['user'])
+		if params['repo_name']		# just to test passed in params
+			@object.first_name = params['repo_name']
+		end
+    show
+  end
+
 end
diff --git a/services/api/test/functional/arvados/v1/users_controller_test.rb b/services/api/test/functional/arvados/v1/users_controller_test.rb
index 583bd48..1da8509 100644
--- a/services/api/test/functional/arvados/v1/users_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/users_controller_test.rb
@@ -53,4 +53,19 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
     assert_nil created['identity_url'], 'even though email is provided, expected no identity_url since users_controller only creates user at this time'
   end
 
+	test "create user with vm and repo" do
+    authorize_with :admin
+
+    post :create, {
+      repo_name: 'test_repo',
+			vm_uuid: 'abcdefg',
+      user: {
+		    first_name: "in_create_test_first_name",
+		    last_name: "test_last_name",
+				email: "test at abc.com"
+      }
+    }
+    assert_response :success
+	end
+
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list