15781: Adds test proving that 'contains' does case-sensitive matching.
[arvados.git] / services / api / app / models / collection.rb
index 649e0f5d090680921d58ea2af53df27fe1b170d2..99933ba7e7df0ef3bc90ec08f8aab49760b68851 100644 (file)
@@ -28,6 +28,7 @@ class Collection < ArvadosModel
   before_validation :check_signatures
   before_validation :strip_signatures_and_update_replication_confirmed
   before_validation :name_null_if_empty
+  validate :ensure_filesystem_compatible_name
   validate :ensure_pdh_matches_manifest_text
   validate :ensure_storage_classes_desired_is_not_empty
   validate :ensure_storage_classes_contain_non_empty_strings
@@ -489,17 +490,13 @@ class Collection < ArvadosModel
         [c.portable_data_hash, c]
       }]
 
-    puts "mg #{migrated_collections} #{collections}"
-
     collections.map { |c|
       # Check if the listed image is compatible first, if not, then try the
       # migration link.
       manifest = Keep::Manifest.new(c.manifest_text)
-      puts "m1 #{manifest.exact_file_count?(1)} #{manifest.files[0][1]} #{pattern}"
       if manifest.exact_file_count?(1) and manifest.files[0][1] =~ pattern
         c
       elsif m = migrated_collections[migrations[c.portable_data_hash]]
-        puts "m2 #{manifest.exact_file_count?(1)} #{manifest.files[0][1]} #{pattern}"
         manifest = Keep::Manifest.new(m.manifest_text)
         if manifest.exact_file_count?(1) and manifest.files[0][1] =~ pattern
           m