[ARVADOS] updated: 4a1dfd3c16896a873fa32becbdd264aa10ada7af

Git user git at public.curoverse.com
Tue Aug 2 16:28:22 EDT 2016


Summary of changes:
 services/api/test/fixtures/container_requests.yml | 24 +++++++++++++++++++++++
 services/api/test/unit/container_request_test.rb  |  7 +++++++
 2 files changed, 31 insertions(+)

       via  4a1dfd3c16896a873fa32becbdd264aa10ada7af (commit)
      from  8b7706d2ab2cbcdf87a3935d987ffaf9befb8df8 (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 4a1dfd3c16896a873fa32becbdd264aa10ada7af
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Tue Aug 2 17:27:14 2016 -0300

    9617, 9618: Added runtime constraints to container requests fixtures. Wrote a new test to load a CR from a fixture and update some attribute to test for the new validations

diff --git a/services/api/test/fixtures/container_requests.yml b/services/api/test/fixtures/container_requests.yml
index 04746d3..de41ff0 100644
--- a/services/api/test/fixtures/container_requests.yml
+++ b/services/api/test/fixtures/container_requests.yml
@@ -13,6 +13,9 @@ queued:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-queuedcontainer
+  runtime_constraints:
+    vcpus: 1
+    ram: 123
 
 running:
   uuid: zzzzz-xvhdp-cr4runningcntnr
@@ -29,6 +32,9 @@ running:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-runningcontainr
+  runtime_constraints:
+    vcpus: 1
+    ram: 123
 
 running-older:
   uuid: zzzzz-xvhdp-cr4runningcntn2
@@ -45,6 +51,9 @@ running-older:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-runningcontain2
+  runtime_constraints:
+    vcpus: 1
+    ram: 123
 
 completed:
   uuid: zzzzz-xvhdp-cr4completedctr
@@ -61,6 +70,9 @@ completed:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-compltcontainer
+  runtime_constraints:
+    vcpus: 1
+    ram: 123
 
 completed-older:
   uuid: zzzzz-xvhdp-cr4completedcr2
@@ -77,6 +89,9 @@ completed-older:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-compltcontainr2
+  runtime_constraints:
+    vcpus: 1
+    ram: 123
 
 cr_for_requester:
   uuid: zzzzz-xvhdp-cr4requestercnt
@@ -94,6 +109,9 @@ cr_for_requester:
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-requestercntnr1
   requesting_container_uuid: zzzzz-dz642-requestingcntnr
+  runtime_constraints:
+    vcpus: 1
+    ram: 123
 
 cr_for_requester2:
   uuid: zzzzz-xvhdp-cr4requestercn2
@@ -110,6 +128,9 @@ cr_for_requester2:
   output_path: test
   command: ["echo", "hello"]
   requesting_container_uuid: zzzzz-dz642-requestercntnr1
+  runtime_constraints:
+    vcpus: 1
+    ram: 123
 
 running_anonymous_accessible:
   uuid: zzzzz-xvhdp-runninganonaccs
@@ -126,6 +147,9 @@ running_anonymous_accessible:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-runningcontain2
+  runtime_constraints:
+    vcpus: 1
+    ram: 123
 
 # Test Helper trims the rest of the file
 
diff --git a/services/api/test/unit/container_request_test.rb b/services/api/test/unit/container_request_test.rb
index 0b96155..b0c55c1 100644
--- a/services/api/test/unit/container_request_test.rb
+++ b/services/api/test/unit/container_request_test.rb
@@ -81,6 +81,13 @@ class ContainerRequestTest < ActiveSupport::TestCase
     end
   end
 
+  test "Update from fixture" do
+    set_user_from_auth :active
+    cr = ContainerRequest.find_by_uuid(container_requests(:running).uuid)
+    cr.update_attributes!(description: "New description")
+    assert_equal "New description", cr.description
+  end
+
   test "Update with valid runtime constraints" do
       set_user_from_auth :active
       cr = create_minimal_req!(state: "Uncommitted", priority: 1)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list