Merge branch 'master' into 14716-webdav-cluster-config
[arvados.git] / services / api / test / unit / container_request_test.rb
index 69e277cc2c000ae627c4b1193c629ac8cf99e7dc..2637e77937b1cb8b5954abed52d66c382fe4f24a 100644 (file)
@@ -515,7 +515,7 @@ class ContainerRequestTest < ActiveSupport::TestCase
   test "Container.resolve_container_image(pdh)" do
     set_user_from_auth :active
     [[:docker_image, 'v1'], [:docker_image_1_12, 'v2']].each do |coll, ver|
-      Rails.configuration.Containers.SupportedDockerImageFormats = [ver]
+      Rails.configuration.Containers.SupportedDockerImageFormats = {ver=>{}}
       pdh = collections(coll).portable_data_hash
       resolved = Container.resolve_container_image(pdh)
       assert_equal resolved, pdh
@@ -541,7 +541,7 @@ class ContainerRequestTest < ActiveSupport::TestCase
   end
 
   test "migrated docker image" do
-    Rails.configuration.Containers.SupportedDockerImageFormats = ['v2']
+    Rails.configuration.Containers.SupportedDockerImageFormats = {'v2'=>{}}
     add_docker19_migration_link
 
     # Test that it returns only v2 images even though request is for v1 image.
@@ -559,7 +559,7 @@ class ContainerRequestTest < ActiveSupport::TestCase
   end
 
   test "use unmigrated docker image" do
-    Rails.configuration.Containers.SupportedDockerImageFormats = ['v1']
+    Rails.configuration.Containers.SupportedDockerImageFormats = {'v1'=>{}}
     add_docker19_migration_link
 
     # Test that it returns only supported v1 images even though there is a
@@ -578,7 +578,7 @@ class ContainerRequestTest < ActiveSupport::TestCase
   end
 
   test "incompatible docker image v1" do
-    Rails.configuration.Containers.SupportedDockerImageFormats = ['v1']
+    Rails.configuration.Containers.SupportedDockerImageFormats = {'v1'=>{}}
     add_docker19_migration_link
 
     # Don't return unsupported v2 image even if we ask for it directly.
@@ -591,7 +591,7 @@ class ContainerRequestTest < ActiveSupport::TestCase
   end
 
   test "incompatible docker image v2" do
-    Rails.configuration.Containers.SupportedDockerImageFormats = ['v2']
+    Rails.configuration.Containers.SupportedDockerImageFormats = {'v2'=>{}}
     # No migration link, don't return unsupported v1 image,
 
     set_user_from_auth :active