[ARVADOS] updated: 22db59393203f550e0c77e65c650e664667492ab

git at public.curoverse.com git at public.curoverse.com
Wed Apr 23 15:11:31 EDT 2014


Summary of changes:
 .../app/controllers/arvados/v1/users_controller.rb |    2 +-
 services/api/app/models/pipeline_instance.rb       |    2 +-
 services/api/app/models/user.rb                    |    4 +-
 .../views/user_notifier/account_is_setup.text.erb  |   13 ++++++--
 services/api/config/environments/test.rb.example   |    3 ++
 services/api/lib/current_api_client.rb             |    8 +++--
 .../functional/arvados/v1/users_controller_test.rb |   32 ++++++++++++++++++-
 services/api/test/test_helper.rb                   |   18 +++++++++++
 services/api/test/unit/application_test.rb         |   32 ++++++++++++++++++++
 services/api/test/unit/pipeline_instance_test.rb   |    9 +++++-
 services/api/test/unit/user_test.rb                |   19 ++++++++++--
 11 files changed, 126 insertions(+), 16 deletions(-)
 create mode 100644 services/api/test/unit/application_test.rb

       via  22db59393203f550e0c77e65c650e664667492ab (commit)
       via  6a0ce3e88fc2122fe7749b6e4bc3eb01fb37b97c (commit)
       via  a955d5a89402d4b68ccec2d00c1ecf7d86334875 (commit)
       via  1059fd1f9e22ebcae51413d2b0fde0416c71c79b (commit)
       via  49aaa9f26dfaf50056abd7527976b681be26208b (commit)
       via  f03e21f7d50e34e7f7f7e7f570e8604fbd4d27da (commit)
       via  35295980b918232db8a8f3321e3bf02729e26c9f (commit)
       via  074147b4138f7a29ed9ff054b916ac1856b71e9f (commit)
       via  beef5fec7c77e3de84902969f877f1b4d5b89eef (commit)
      from  8072742e6557966b3e3d699e18fd3ee8656ed5b7 (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 22db59393203f550e0c77e65c650e664667492ab
Author: radhika chippada <radhika at curoverse.com>
Date:   Wed Apr 23 15:01:41 2014 -0400

    Story 2352: Adding state and components_summary is completed.

diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb
index fbe3690..d314885 100644
--- a/services/api/app/models/pipeline_instance.rb
+++ b/services/api/app/models/pipeline_instance.rb
@@ -178,7 +178,7 @@ class PipelineInstance < ArvadosModel
       else
         return false
       end
-    elsif components_changed? 
+    elsif components_changed?
       if !self.state || self.state == New || !self.active
         if self.components_look_ready?
           self.state = Ready
diff --git a/services/api/test/unit/pipeline_instance_test.rb b/services/api/test/unit/pipeline_instance_test.rb
index 20c833f..dfda3cc 100644
--- a/services/api/test/unit/pipeline_instance_test.rb
+++ b/services/api/test/unit/pipeline_instance_test.rb
@@ -10,6 +10,8 @@ class PipelineInstanceTest < ActiveSupport::TestCase
     assert !pi.state, 'expected state to be nil because the fixture had no state specified'
 
     # save the pipeline and expect state to be New
+    Thread.current[:user] = users(:admin)
+
     pi.save
     pi = PipelineInstance.find_by_uuid 'zzzzz-xxxxx-f4gneyn6br1xize'
     assert_equal PipelineInstance::New, pi.state, 'expected state to be New for new pipeline'
@@ -18,6 +20,8 @@ class PipelineInstanceTest < ActiveSupport::TestCase
   end
 
   test "update attributes for pipeline" do
+    Thread.current[:user] = users(:admin)
+
     pi = pipeline_instances :new_pipeline
 
     # add a component with no input and expect state to be New
@@ -52,7 +56,7 @@ class PipelineInstanceTest < ActiveSupport::TestCase
     assert_equal pi.components.size, 1, 'expected one component'
     assert !pi.active, 'expected active to be false after update'
     assert !pi.success, 'expected success to be false for a new pipeline'
-   
+
     pi.active = true
     pi.save
     pi = PipelineInstance.find_by_uuid 'zzzzz-xxxxx-f4gneyn6br1xize'
@@ -112,7 +116,10 @@ class PipelineInstanceTest < ActiveSupport::TestCase
     pi.components['first'] = component1
     pi.components['second'] = component2
     components = pi.components
+
+    Thread.current[:user] = users(:admin)
     pi.update_attribute 'components', pi.components
+
     pi = PipelineInstance.find_by_uuid 'zzzzz-xxxxx-f4gneyn6br1xize'
     assert_equal PipelineInstance::New, pi.state, 'expected state to be New after adding component with input'
     assert_equal pi.components.size, 2, 'expected two components'

commit 6a0ce3e88fc2122fe7749b6e4bc3eb01fb37b97c
Merge: 8072742 a955d5a
Author: radhika chippada <radhika at curoverse.com>
Date:   Wed Apr 23 14:36:06 2014 -0400

    Merge branch 'master' into 2352-phased-pipeline-instance-state


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


hooks/post-receive
-- 




More information about the arvados-commits mailing list