[ARVADOS] updated: 1.2.0-295-g7f223f48c

Git user git at public.curoverse.com
Wed Oct 31 13:00:29 EDT 2018


Summary of changes:
 services/api/test/unit/container_request_test.rb | 9 +++++++--
 services/api/test/unit/job_test.rb               | 1 +
 2 files changed, 8 insertions(+), 2 deletions(-)

       via  7f223f48c24dfa8c3d8247f8e48656a5edca7ea5 (commit)
      from  4427f2c5f740d03d5ee38745159f61b6805843e7 (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 7f223f48c24dfa8c3d8247f8e48656a5edca7ea5
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Wed Oct 31 12:53:25 2018 -0400

    14262: Fix spillover of tests changing remote_hosts
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/api/test/unit/container_request_test.rb b/services/api/test/unit/container_request_test.rb
index 0fafb9903..f53b07e5a 100644
--- a/services/api/test/unit/container_request_test.rb
+++ b/services/api/test/unit/container_request_test.rb
@@ -506,6 +506,7 @@ class ContainerRequestTest < ActiveSupport::TestCase
   ].each do |img|
     test "container_image_for_container(#{img.inspect}) => 422" do
       set_user_from_auth :active
+      Rails.configuration.remote_hosts = {}
       assert_raises(ArvadosModel::UnresolvableContainerError) do
         Container.resolve_container_image(img)
       end
@@ -514,8 +515,12 @@ class ContainerRequestTest < ActiveSupport::TestCase
 
   test "allow unrecognized container when there are remote_hosts" do
     set_user_from_auth :active
-    Rails.configuration.remote_hosts = {"foooo" => "bar.com"}
-    Container.resolve_container_image('acbd18db4cc2f85cedef654fccc4a4d8+3')
+    begin
+      Rails.configuration.remote_hosts = {"foooo" => "bar.com"}
+      Container.resolve_container_image('acbd18db4cc2f85cedef654fccc4a4d8+3')
+    ensure
+      Rails.configuration.remote_hosts = {}
+    end
   end
 
   test "migrated docker image" do
diff --git a/services/api/test/unit/job_test.rb b/services/api/test/unit/job_test.rb
index fc6a97cf7..41e2adb9c 100644
--- a/services/api/test/unit/job_test.rb
+++ b/services/api/test/unit/job_test.rb
@@ -127,6 +127,7 @@ class JobTest < ActiveSupport::TestCase
     'locator' => BAD_COLLECTION,
   }.each_pair do |spec_type, image_spec|
     test "Job validation fails with nonexistent Docker image #{spec_type}" do
+      Rails.configuration.remote_hosts = {}
       job = Job.new job_attrs(runtime_constraints:
                               {'docker_image' => image_spec})
       assert(job.invalid?, "nonexistent Docker image #{spec_type} was valid")

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list