14873: Adjusts latest API Server changes to be rails5 worthy.
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 5 Apr 2019 12:59:26 +0000 (09:59 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 5 Apr 2019 12:59:26 +0000 (09:59 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
services/api/db/structure.sql
services/api/test/functional/arvados/v1/collections_controller_test.rb

index 146e105afaac9331dbd6fc2926b29198718c69d0..61f9b2d8841d0f0e850c1c5720037cc898c70539 100755 (executable)
@@ -5,7 +5,7 @@
 require "arvados/keep"
 require "group_pdhs"
 
-class AddFileInfoToCollection < ActiveRecord::Migration
+class AddFileInfoToCollection < ActiveRecord::Migration[4.2]
   def do_batch(pdhs)
     pdhs_str = ''
     pdhs.each do |pdh|
index cbe713a1c30dfb889dcb3932d3109b3b5be5ff5d..bf7fdc8058f945ce154fc79bbf8051fe7a8c04aa 100644 (file)
@@ -3059,7 +3059,5 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('20181011184200'),
 ('20181213183234'),
 ('20190214214814');
-
-
-INSERT INTO schema_migrations (version) VALUES ('20190322174136');
+('20190322174136');
 
index 72c83e515e349839cc6a4d11f6f3d5dac60b00d0..ee2b016cd53e29a230ca9b7ba5be3ec86022dfde 100644 (file)
@@ -946,7 +946,7 @@ EOS
   ].each do |manifest, count, size|
     test "create collection with valid manifest #{manifest} and expect file stats" do
       authorize_with :active
-      post :create, {
+      post :create, params: {
         collection: {
           manifest_text: manifest
         }
@@ -959,7 +959,7 @@ EOS
 
   test "update collection manifest and expect new file stats" do
     authorize_with :active
-    post :update, {
+    post :update, params: {
       id: collections(:collection_owned_by_active_with_file_stats).uuid,
       collection: {
         manifest_text: ". d41d8cd98f00b204e9800998ecf8427e 0:34:foo.txt\n"
@@ -976,7 +976,7 @@ EOS
   ].each do |attribute, val|
     test "create collection with #{attribute} and expect overwrite" do
       authorize_with :active
-      post :create, {
+      post :create, params: {
         collection: {
           manifest_text: ". d41d8cd98f00b204e9800998ecf8427e 0:34:foo.txt\n",
           "#{attribute}": 10
@@ -993,7 +993,7 @@ EOS
   ].each do |attribute, val|
     test "update collection with #{attribute} and expect ignore" do
       authorize_with :active
-      post :update, {
+      post :update, params: {
         id: collections(:collection_owned_by_active_with_file_stats).uuid,
         collection: {
           "#{attribute}": 10
@@ -1010,7 +1010,7 @@ EOS
   ].each do |attribute, val|
     test "update collection with #{attribute} and manifest and expect manifest values" do
       authorize_with :active
-      post :update, {
+      post :update, params: {
         id: collections(:collection_owned_by_active_with_file_stats).uuid,
         collection: {
           manifest_text: ". d41d8cd98f00b204e9800998ecf8427e 0:34:foo.txt\n",