JSONB columns shouldn't be declared as 'serialized' because their content
get encoded twice.
When not declaring them as serialized, their default values (eg: [], {})
should be explicitly set.
Fixes on fixtures when default JSONB values are not defined on the schema.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>
18 files changed:
group :test, :development do
gem 'factory_bot_rails'
gem 'database_cleaner'
group :test, :development do
gem 'factory_bot_rails'
gem 'database_cleaner'
+
+ # As of now (2019-03-27) There's an open issue about incompatibilities with
+ # newer versions of this gem: https://github.com/rails/rails-perftest/issues/38
+ gem 'ruby-prof', '~> 0.15.0'
+
# Note: "require: false" here tells bunder not to automatically
# 'require' the packages during application startup. Installation is
# still mandatory.
# Note: "require: false" here tells bunder not to automatically
# 'require' the packages during application startup. Installation is
# still mandatory.
net-ssh-gateway (2.0.0)
net-ssh (>= 4.0.0)
nio4r (2.3.1)
net-ssh-gateway (2.0.0)
net-ssh (>= 4.0.0)
nio4r (2.3.1)
mini_portile2 (~> 2.4.0)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
mini_portile2 (~> 2.4.0)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
rack
rake (>= 0.8.1)
pg (1.1.4)
rack
rake (>= 0.8.1)
pg (1.1.4)
public_suffix (3.0.3)
rack (2.0.6)
rack-test (0.6.3)
public_suffix (3.0.3)
rack (2.0.6)
rack-test (0.6.3)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
retriable (1.4.1)
actionpack (>= 4.2.0, < 6.0)
railties (>= 4.2.0, < 6.0)
retriable (1.4.1)
rvm-capistrano (1.5.6)
capistrano (~> 2.15.4)
safe_yaml (1.0.5)
rvm-capistrano (1.5.6)
capistrano (~> 2.15.4)
safe_yaml (1.0.5)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkey (2.0.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sshkey (2.0.0)
power_assert
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
power_assert
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
rails-observers
rails-perftest
responders (~> 2.0)
rails-observers
rails-perftest
responders (~> 2.0)
rvm-capistrano
safe_yaml
simplecov (~> 0.7.1)
rvm-capistrano
safe_yaml
simplecov (~> 0.7.1)
uglifier (~> 2.0)
BUNDLED WITH
uglifier (~> 2.0)
BUNDLED WITH
raise ArgumentError.new("#{colname} parameter cannot have non-string hash keys")
end
end
raise ArgumentError.new("#{colname} parameter cannot have non-string hash keys")
end
end
+ # Check JSONB columns that aren't listed on serialized_attributes
+ columns.select{|c| c.type == :jsonb}.collect{|j| j.name}.each do |colname|
+ if serialized_attributes.include? colname || raw_params[colname.to_sym].nil?
+ next
+ end
+ if has_nonstring_keys?(raw_params[colname.to_sym])
+ raise ArgumentError.new("#{colname} parameter cannot have non-string hash keys")
+ end
+ end
end
ActionController::Parameters.new(raw_params).permit!
end
end
ActionController::Parameters.new(raw_params).permit!
end
def self.full_text_tsvector
parts = full_text_searchable_columns.collect do |column|
def self.full_text_tsvector
parts = full_text_searchable_columns.collect do |column|
- cast = serialized_attributes[column] ? '::text' : ''
+ is_jsonb = self.columns.select{|x|x.name == column}[0].type == :jsonb
+ cast = (is_jsonb || serialized_attributes[column]) ? '::text' : ''
"coalesce(#{column}#{cast},'')"
end
"to_tsvector('english', substr(#{parts.join(" || ' ' || ")}, 0, 8000))"
"coalesce(#{column}#{cast},'')"
end
"to_tsvector('english', substr(#{parts.join(" || ' ' || ")}, 0, 8000))"
# we'll convert symbols to strings when loading from the
# database. (Otherwise, loading and saving an object with existing
# symbols in a serialized field will crash.)
# we'll convert symbols to strings when loading from the
# database. (Otherwise, loading and saving an object with existing
# symbols in a serialized field will crash.)
- self.class.serialized_attributes.each do |colname, attr|
+ jsonb_cols = self.class.columns.select{|c| c.type == :jsonb}.collect{|j| j.name}
+ (jsonb_cols + self.class.serialized_attributes.keys).uniq.each do |colname|
if self.class.has_symbols? attributes[colname]
attributes[colname] = self.class.recursive_stringify attributes[colname]
send(colname + '=',
if self.class.has_symbols? attributes[colname]
attributes[colname] = self.class.recursive_stringify attributes[colname]
send(colname + '=',
include CommonApiTemplate
include Trashable
include CommonApiTemplate
include Trashable
- serialize :properties, Hash
- serialize :storage_classes_desired, Array
- serialize :storage_classes_confirmed, Array
+ # Posgresql JSONB columns should NOT be declared as serialized, Rails 5
+ # already know how to properly treat them.
+ before_validation :fill_field_defaults
before_validation :default_empty_manifest
before_validation :default_storage_classes, on: :create
before_validation :check_encoding
before_validation :default_empty_manifest
before_validation :default_storage_classes, on: :create
before_validation :check_encoding
self.current_version_uuid ||= self.uuid
true
end
self.current_version_uuid ||= self.uuid
true
end
+
+ def fill_field_defaults
+ self.properties ||= {}
+ self.storage_classes_desired ||= []
+ self.storage_classes_confirmed ||= []
+ end
extend DbCurrentTime
extend LogReuseInfo
extend DbCurrentTime
extend LogReuseInfo
+ # Posgresql JSONB columns should NOT be declared as serialized, Rails 5
+ # already know how to properly treat them.
serialize :environment, Hash
serialize :mounts, Hash
serialize :runtime_constraints, Hash
serialize :command, Array
serialize :scheduling_parameters, Hash
serialize :environment, Hash
serialize :mounts, Hash
serialize :runtime_constraints, Hash
serialize :command, Array
serialize :scheduling_parameters, Hash
- serialize :secret_mounts, Hash
- serialize :runtime_status, Hash
before_validation :fill_field_defaults, :if => :new_record?
before_validation :set_timestamps
before_validation :fill_field_defaults, :if => :new_record?
before_validation :set_timestamps
- serialize :properties, Hash
+ # Posgresql JSONB columns should NOT be declared as serialized, Rails 5
+ # already know how to properly treat them.
serialize :environment, Hash
serialize :mounts, Hash
serialize :runtime_constraints, Hash
serialize :command, Array
serialize :scheduling_parameters, Hash
serialize :environment, Hash
serialize :mounts, Hash
serialize :runtime_constraints, Hash
serialize :command, Array
serialize :scheduling_parameters, Hash
- serialize :secret_mounts, Hash
before_validation :fill_field_defaults, :if => :new_record?
before_validation :validate_runtime_constraints
before_validation :fill_field_defaults, :if => :new_record?
before_validation :validate_runtime_constraints
self.environment ||= {}
self.runtime_constraints ||= {}
self.mounts ||= {}
self.environment ||= {}
self.runtime_constraints ||= {}
self.mounts ||= {}
+ self.secret_mounts ||= {}
self.cwd ||= "."
self.container_count_max ||= Rails.configuration.container_count_max
self.scheduling_parameters ||= {}
self.cwd ||= "."
self.container_count_max ||= Rails.configuration.container_count_max
self.scheduling_parameters ||= {}
include CanBeAnOwner
include Trashable
include CanBeAnOwner
include Trashable
- serialize :properties, Hash
+ # Posgresql JSONB columns should NOT be declared as serialized, Rails 5
+ # already know how to properly treat them.
after_create :invalidate_permissions_cache
after_update :maybe_invalidate_permissions_cache
after_create :invalidate_permissions_cache
after_update :maybe_invalidate_permissions_cache
include HasUuid
include KindAndEtag
include CommonApiTemplate
include HasUuid
include KindAndEtag
include CommonApiTemplate
- serialize :properties, Hash
+
+ # Posgresql JSONB columns should NOT be declared as serialized, Rails 5
+ # already know how to properly treat them.
+
before_create :permission_to_attach_to_objects
before_update :permission_to_attach_to_objects
after_update :maybe_invalidate_permissions_cache
before_create :permission_to_attach_to_objects
before_update :permission_to_attach_to_objects
after_update :maybe_invalidate_permissions_cache
include HasUuid
include KindAndEtag
include CommonApiTemplate
include HasUuid
include KindAndEtag
include CommonApiTemplate
- serialize :info, Hash
- serialize :properties, Hash
+
+ # Posgresql JSONB columns should NOT be declared as serialized, Rails 5
+ # already know how to properly treat them.
+
+ before_validation :fill_field_defaults
before_validation :ensure_ping_secret
after_update :dns_server_update
before_validation :ensure_ping_secret
after_update :dns_server_update
+ def fill_field_defaults
+ self.info ||= {}
+ self.properties ||= {}
+ end
+
def assign_hostname
if self.hostname.nil? and Rails.configuration.assign_node_hostname
self.hostname = self.class.hostname_for_slot(self.slot_number)
def assign_hostname
if self.hostname.nil? and Rails.configuration.assign_node_hostname
self.hostname = self.class.hostname_for_slot(self.slot_number)
def check_enable_legacy_jobs_api
if Rails.configuration.enable_legacy_jobs_api == false ||
(Rails.configuration.enable_legacy_jobs_api == "auto" &&
def check_enable_legacy_jobs_api
if Rails.configuration.enable_legacy_jobs_api == false ||
(Rails.configuration.enable_legacy_jobs_api == "auto" &&
- ActiveRecord::Base.connection.exec_query("select count(*) from jobs").first["count"] == "0")
- Rails.configuration.disable_api_methods = Disable_jobs_api_method_list
+ Job.count == 0)
+ Rails.configuration.disable_api_methods += Disable_jobs_api_method_list
updated_at: 2013-12-26T19:22:54Z
manifest_text: ". 6a4ff0499484c6c79c95cd8c566bd25f+249025 0:249025:GNU_General_Public_License,_version_3.pdf\n"
name: user_agreement
updated_at: 2013-12-26T19:22:54Z
manifest_text: ". 6a4ff0499484c6c79c95cd8c566bd25f+249025 0:249025:GNU_General_Public_License,_version_3.pdf\n"
name: user_agreement
collection_owned_by_active:
uuid: zzzzz-4zz18-bv31uwvy3neko21
collection_owned_by_active:
uuid: zzzzz-4zz18-bv31uwvy3neko21
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: owned_by_active
version: 2
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: owned_by_active
version: 2
collection_owned_by_active_past_version_1:
uuid: zzzzz-4zz18-znfnqtbbv4spast
collection_owned_by_active_past_version_1:
uuid: zzzzz-4zz18-znfnqtbbv4spast
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: owned_by_active_version_1
version: 1
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: owned_by_active_version_1
version: 1
foo_file:
uuid: zzzzz-4zz18-znfnqtbbv4spc3w
foo_file:
uuid: zzzzz-4zz18-znfnqtbbv4spc3w
updated_at: 2015-02-03T17:22:54Z
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
name: foo_file
updated_at: 2015-02-03T17:22:54Z
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
name: foo_file
bar_file:
uuid: zzzzz-4zz18-ehbhgtheo8909or
bar_file:
uuid: zzzzz-4zz18-ehbhgtheo8909or
updated_at: 2015-02-03T17:22:54Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: bar_file
updated_at: 2015-02-03T17:22:54Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: bar_file
baz_file:
uuid: zzzzz-4zz18-y9vne9npefyxh8g
baz_file:
uuid: zzzzz-4zz18-y9vne9npefyxh8g
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: baz_file
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: baz_file
w_a_z_file:
uuid: zzzzz-4zz18-25k12570yk134b3
w_a_z_file:
uuid: zzzzz-4zz18-25k12570yk134b3
manifest_text: ". 4c6c2c0ac8aa0696edd7316a3be5ca3c+5 0:5:w\\040\\141\\040z\n"
name: "\"w a z\" file"
version: 2
manifest_text: ". 4c6c2c0ac8aa0696edd7316a3be5ca3c+5 0:5:w\\040\\141\\040z\n"
name: "\"w a z\" file"
version: 2
w_a_z_file_version_1:
uuid: zzzzz-4zz18-25k12570yk1ver1
w_a_z_file_version_1:
uuid: zzzzz-4zz18-25k12570yk1ver1
manifest_text: ". 4d20280d5e516a0109768d49ab0f3318+3 0:3:waz\n"
name: "waz file"
version: 1
manifest_text: ". 4d20280d5e516a0109768d49ab0f3318+3 0:3:waz\n"
name: "waz file"
version: 1
multilevel_collection_1:
uuid: zzzzz-4zz18-pyw8yp9g3pr7irn
multilevel_collection_1:
uuid: zzzzz-4zz18-pyw8yp9g3pr7irn
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2 0:0:file3\n./dir1 d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2 0:0:file3\n./dir1/subdir d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2 0:0:file3\n./dir2 d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2 0:0:file3\n"
name: multilevel_collection_1
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2 0:0:file3\n./dir1 d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2 0:0:file3\n./dir1/subdir d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2 0:0:file3\n./dir2 d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2 0:0:file3\n"
name: multilevel_collection_1
multilevel_collection_2:
uuid: zzzzz-4zz18-45xf9hw1sxkhl6q
multilevel_collection_2:
uuid: zzzzz-4zz18-45xf9hw1sxkhl6q
updated_at: 2014-02-03T17:22:54Z
manifest_text: "./dir1/sub1 d41d8cd98f00b204e9800998ecf8427e+0 0:0:a 0:0:b\n./dir2/sub2 d41d8cd98f00b204e9800998ecf8427e+0 0:0:c 0:0:d\n"
name: multilevel_collection_2
updated_at: 2014-02-03T17:22:54Z
manifest_text: "./dir1/sub1 d41d8cd98f00b204e9800998ecf8427e+0 0:0:a 0:0:b\n./dir2/sub2 d41d8cd98f00b204e9800998ecf8427e+0 0:0:c 0:0:d\n"
name: multilevel_collection_2
docker_image:
uuid: zzzzz-4zz18-1v45jub259sjjgb
docker_image:
uuid: zzzzz-4zz18-1v45jub259sjjgb
updated_at: 2014-06-11T17:22:54Z
manifest_text: ". d21353cfe035e3e384563ee55eadbb2f+67108864 5c77a43e329b9838cbec18ff42790e57+55605760 0:122714624:d8309758b8fe2c81034ffc8a10c36460b77db7bc5e7b448c4e5b684f9d95a678.tar\n"
name: docker_image
updated_at: 2014-06-11T17:22:54Z
manifest_text: ". d21353cfe035e3e384563ee55eadbb2f+67108864 5c77a43e329b9838cbec18ff42790e57+55605760 0:122714624:d8309758b8fe2c81034ffc8a10c36460b77db7bc5e7b448c4e5b684f9d95a678.tar\n"
name: docker_image
# tagged docker image with sha256:{hash}.tar filename
docker_image_1_12:
# tagged docker image with sha256:{hash}.tar filename
docker_image_1_12:
updated_at: 2016-10-19 08:50:45.652930000 Z
manifest_text: ". d21353cfe035e3e384563ee55eadbb2f+67108864 5c77a43e329b9838cbec18ff42790e57+55605760 0:122714624:sha256:d8309758b8fe2c81034ffc8a10c36460b77db7bc5e7b448c4e5b684f9d95a678.tar\n"
name: docker_image_1_12
updated_at: 2016-10-19 08:50:45.652930000 Z
manifest_text: ". d21353cfe035e3e384563ee55eadbb2f+67108864 5c77a43e329b9838cbec18ff42790e57+55605760 0:122714624:sha256:d8309758b8fe2c81034ffc8a10c36460b77db7bc5e7b448c4e5b684f9d95a678.tar\n"
name: docker_image_1_12
unlinked_docker_image:
uuid: zzzzz-4zz18-d0d8z5wofvfgwad
unlinked_docker_image:
uuid: zzzzz-4zz18-d0d8z5wofvfgwad
updated_at: 2014-06-11T17:22:54Z
manifest_text: ". fca529cfe035e3e384563ee55eadbb2f+67108863 0:67108863:bcd02158b8fe2c81034ffc8a10c36460b77db7bc5e7b448c4e5b684f9d95a678.tar\n"
name: unlinked_docker_image
updated_at: 2014-06-11T17:22:54Z
manifest_text: ". fca529cfe035e3e384563ee55eadbb2f+67108863 0:67108863:bcd02158b8fe2c81034ffc8a10c36460b77db7bc5e7b448c4e5b684f9d95a678.tar\n"
name: unlinked_docker_image
empty:
uuid: zzzzz-4zz18-gs9ooj1h9sd5mde
empty:
uuid: zzzzz-4zz18-gs9ooj1h9sd5mde
updated_at: 2014-06-11T17:22:54Z
manifest_text: ""
name: empty_collection
updated_at: 2014-06-11T17:22:54Z
manifest_text: ""
name: empty_collection
foo_collection_in_aproject:
uuid: zzzzz-4zz18-fy296fx3hot09f7
foo_collection_in_aproject:
uuid: zzzzz-4zz18-fy296fx3hot09f7
updated_at: 2014-04-21 15:37:48 -0400
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
name: "zzzzz-4zz18-fy296fx3hot09f7 added sometime"
updated_at: 2014-04-21 15:37:48 -0400
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
name: "zzzzz-4zz18-fy296fx3hot09f7 added sometime"
user_agreement_in_anonymously_accessible_project:
uuid: zzzzz-4zz18-uukreo9rbgwsujr
user_agreement_in_anonymously_accessible_project:
uuid: zzzzz-4zz18-uukreo9rbgwsujr
updated_at: 2014-06-13 20:42:26 -0800
manifest_text: ". 6a4ff0499484c6c79c95cd8c566bd25f+249025 0:249025:GNU_General_Public_License,_version_3.pdf\n"
name: GNU General Public License, version 3
updated_at: 2014-06-13 20:42:26 -0800
manifest_text: ". 6a4ff0499484c6c79c95cd8c566bd25f+249025 0:249025:GNU_General_Public_License,_version_3.pdf\n"
name: GNU General Public License, version 3
public_text_file:
uuid: zzzzz-4zz18-4en62shvi99lxd4
public_text_file:
uuid: zzzzz-4zz18-4en62shvi99lxd4
updated_at: 2015-02-12 16:58:03 -0500
manifest_text: ". f0ef7081e1539ac00ef5b761b4fb01b3+12 0:12:Hello\\040world.txt\n"
name: Hello world
updated_at: 2015-02-12 16:58:03 -0500
manifest_text: ". f0ef7081e1539ac00ef5b761b4fb01b3+12 0:12:Hello\\040world.txt\n"
name: Hello world
baz_collection_name_in_asubproject:
uuid: zzzzz-4zz18-lsitwcf548ui4oe
baz_collection_name_in_asubproject:
uuid: zzzzz-4zz18-lsitwcf548ui4oe
updated_at: 2014-04-21 15:37:48 -0400
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: "zzzzz-4zz18-lsitwcf548ui4oe added sometime"
updated_at: 2014-04-21 15:37:48 -0400
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: "zzzzz-4zz18-lsitwcf548ui4oe added sometime"
empty_collection_name_in_active_user_home_project:
uuid: zzzzz-4zz18-5qa38qghh1j3nvv
empty_collection_name_in_active_user_home_project:
uuid: zzzzz-4zz18-5qa38qghh1j3nvv
modified_at: 2014-08-06 22:11:51.242150425 Z
manifest_text: ""
name: Empty collection
modified_at: 2014-08-06 22:11:51.242150425 Z
manifest_text: ""
name: Empty collection
baz_file_in_asubproject:
uuid: zzzzz-4zz18-0mri2x4u7ftngez
baz_file_in_asubproject:
uuid: zzzzz-4zz18-0mri2x4u7ftngez
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: baz_file
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: baz_file
collection_to_move_around_in_aproject:
uuid: zzzzz-4zz18-0mri2x4u7ft1234
collection_to_move_around_in_aproject:
uuid: zzzzz-4zz18-0mri2x4u7ft1234
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: collection_to_move_around
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: collection_to_move_around
# Note: collections(:expired_collection) fixture finder won't work
# because it is not in default scope
# Note: collections(:expired_collection) fixture finder won't work
# because it is not in default scope
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: expired_collection
version: 2
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: expired_collection
version: 2
expired_collection_past_version:
uuid: zzzzz-4zz18-mto52zx1s7oldie
expired_collection_past_version:
uuid: zzzzz-4zz18-mto52zx1s7oldie
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: expired_collection original
version: 1
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: expired_collection original
version: 1
trashed_on_next_sweep:
uuid: zzzzz-4zz18-4guozfh77ewd2f0
trashed_on_next_sweep:
uuid: zzzzz-4zz18-4guozfh77ewd2f0
delete_at: 2112-01-01T00:00:00Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: trashed_on_next_sweep
delete_at: 2112-01-01T00:00:00Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: trashed_on_next_sweep
# Note: collections(:deleted_on_next_sweep) fixture finder won't work
# because it is not in default scope
# Note: collections(:deleted_on_next_sweep) fixture finder won't work
# because it is not in default scope
delete_at: 2016-12-27T22:01:30.234567Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: deleted_on_next_sweep
delete_at: 2016-12-27T22:01:30.234567Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: deleted_on_next_sweep
collection_expires_in_future:
uuid: zzzzz-4zz18-padkqo7yb8d9i3j
collection_expires_in_future:
uuid: zzzzz-4zz18-padkqo7yb8d9i3j
delete_at: 2038-03-01T00:00:00Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: collection_expires_in_future
delete_at: 2038-03-01T00:00:00Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:expired\n"
name: collection_expires_in_future
unique_expired_collection:
uuid: zzzzz-4zz18-mto52zx1s7sn3jk
unique_expired_collection:
uuid: zzzzz-4zz18-mto52zx1s7sn3jk
delete_at: 2038-01-01T00:00:00Z
manifest_text: ". 29d7797f1888013986899bc9083783fa+3 0:3:expired\n"
name: unique_expired_collection1
delete_at: 2038-01-01T00:00:00Z
manifest_text: ". 29d7797f1888013986899bc9083783fa+3 0:3:expired\n"
name: unique_expired_collection1
unique_expired_collection2:
uuid: zzzzz-4zz18-mto52zx1s7sn3jr
unique_expired_collection2:
uuid: zzzzz-4zz18-mto52zx1s7sn3jr
delete_at: 2038-01-01T00:00:00Z
manifest_text: ". 29d7797f1888013986899bc9083783fa+3 0:3:expired\n"
name: unique_expired_collection2
delete_at: 2038-01-01T00:00:00Z
manifest_text: ". 29d7797f1888013986899bc9083783fa+3 0:3:expired\n"
name: unique_expired_collection2
# a collection with a log file that can be parsed by the log viewer
# This collection hash matches the following log text:
# a collection with a log file that can be parsed by the log viewer
# This collection hash matches the following log text:
portable_data_hash: 0b9a7787660e1fce4a93f33e01376ba6+81
manifest_text: ". cdd549ae79fe6640fa3d5c6261d8303c+195 0:195:zzzzz-8i9sb-0vsrcqi7whchuil.log.txt\n"
name: real_log_collection
portable_data_hash: 0b9a7787660e1fce4a93f33e01376ba6+81
manifest_text: ". cdd549ae79fe6640fa3d5c6261d8303c+195 0:195:zzzzz-8i9sb-0vsrcqi7whchuil.log.txt\n"
name: real_log_collection
collection_in_home_project_with_same_name_as_in_aproject:
uuid: zzzzz-4zz18-12342x4u7ftabcd
collection_in_home_project_with_same_name_as_in_aproject:
uuid: zzzzz-4zz18-12342x4u7ftabcd
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: collection_with_same_name_in_aproject_and_home_project
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: collection_with_same_name_in_aproject_and_home_project
collection_in_aproject_with_same_name_as_in_home_project:
uuid: zzzzz-4zz18-56782x4u7ftefgh
collection_in_aproject_with_same_name_as_in_home_project:
uuid: zzzzz-4zz18-56782x4u7ftefgh
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: collection_with_same_name_in_aproject_and_home_project
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: collection_with_same_name_in_aproject_and_home_project
collection_owned_by_foo:
uuid: zzzzz-4zz18-50surkhkbhsp31b
collection_owned_by_foo:
uuid: zzzzz-4zz18-50surkhkbhsp31b
created_at: 2014-02-03T17:22:54Z
modified_at: 2014-02-03T17:22:54Z
name: collection_owned_by_foo
created_at: 2014-02-03T17:22:54Z
modified_at: 2014-02-03T17:22:54Z
name: collection_owned_by_foo
collection_to_remove_from_subproject:
# The Workbench tests remove this from subproject.
collection_to_remove_from_subproject:
# The Workbench tests remove this from subproject.
created_at: 2014-10-15T10:45:00
modified_at: 2014-10-15T10:45:00
name: Collection to remove from subproject
created_at: 2014-10-15T10:45:00
modified_at: 2014-10-15T10:45:00
name: Collection to remove from subproject
collection_with_files_in_subdir:
uuid: zzzzz-4zz18-filesinsubdir00
collection_with_files_in_subdir:
uuid: zzzzz-4zz18-filesinsubdir00
modified_at: 2014-02-03T17:22:54Z
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 85877ca2d7e05498dd3d109baf2df106+95 0:95:file_in_subdir1\n./subdir2/subdir3 2bbc341c702df4d8f42ec31f16c10120+64 0:32:file1_in_subdir3.txt 32:32:file2_in_subdir3.txt\n./subdir2/subdir3/subdir4 2bbc341c702df4d8f42ec31f16c10120+64 0:32:file1_in_subdir4.txt 32:32:file2_in_subdir4.txt"
modified_at: 2014-02-03T17:22:54Z
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 85877ca2d7e05498dd3d109baf2df106+95 0:95:file_in_subdir1\n./subdir2/subdir3 2bbc341c702df4d8f42ec31f16c10120+64 0:32:file1_in_subdir3.txt 32:32:file2_in_subdir3.txt\n./subdir2/subdir3/subdir4 2bbc341c702df4d8f42ec31f16c10120+64 0:32:file1_in_subdir4.txt 32:32:file2_in_subdir4.txt"
graph_test_collection1:
uuid: zzzzz-4zz18-bv31uwvy3neko22
graph_test_collection1:
uuid: zzzzz-4zz18-bv31uwvy3neko22
name: bar_file
created_at: 2014-02-03T17:22:54Z
modified_at: 2014-02-03T17:22:54Z
name: bar_file
created_at: 2014-02-03T17:22:54Z
modified_at: 2014-02-03T17:22:54Z
graph_test_collection2:
uuid: zzzzz-4zz18-uukreo9rbgwsujx
graph_test_collection2:
uuid: zzzzz-4zz18-uukreo9rbgwsujx
name: "FOO General Public License, version 3"
created_at: 2014-02-03T17:22:54Z
modified_at: 2014-02-03T17:22:54Z
name: "FOO General Public License, version 3"
created_at: 2014-02-03T17:22:54Z
modified_at: 2014-02-03T17:22:54Z
graph_test_collection3:
uuid: zzzzz-4zz18-uukreo9rbgwsujj
graph_test_collection3:
uuid: zzzzz-4zz18-uukreo9rbgwsujj
name: "baz file"
created_at: 2014-02-03T17:22:54Z
modified_at: 2014-02-03T17:22:54Z
name: "baz file"
created_at: 2014-02-03T17:22:54Z
modified_at: 2014-02-03T17:22:54Z
collection_1_owned_by_fuse:
uuid: zzzzz-4zz18-ovx05bfzormx3bg
collection_1_owned_by_fuse:
uuid: zzzzz-4zz18-ovx05bfzormx3bg
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: "collection #1 owned by FUSE"
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: "collection #1 owned by FUSE"
collection_2_owned_by_fuse:
uuid: zzzzz-4zz18-8ubpy4w74twtwzr
collection_2_owned_by_fuse:
uuid: zzzzz-4zz18-8ubpy4w74twtwzr
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
name: "collection #2 owned by FUSE"
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
name: "collection #2 owned by FUSE"
collection_in_fuse_project:
uuid: zzzzz-4zz18-vx4mtkjqfrb534f
collection_in_fuse_project:
uuid: zzzzz-4zz18-vx4mtkjqfrb534f
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: "collection in FUSE project"
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n"
name: "collection in FUSE project"
collection_with_no_name_in_aproject:
uuid: zzzzz-4zz18-00000nonamecoll
collection_with_no_name_in_aproject:
uuid: zzzzz-4zz18-00000nonamecoll
modified_at: 2014-04-21 15:37:48 -0400
updated_at: 2014-04-21 15:37:48 -0400
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
modified_at: 2014-04-21 15:37:48 -0400
updated_at: 2014-04-21 15:37:48 -0400
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
collection_to_search_for_in_aproject:
uuid: zzzzz-4zz18-abcd6fx123409f7
collection_to_search_for_in_aproject:
uuid: zzzzz-4zz18-abcd6fx123409f7
updated_at: 2014-04-21 15:37:48 -0400
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
name: "zzzzz-4zz18-abcd6fx123409f7 used to search with any"
updated_at: 2014-04-21 15:37:48 -0400
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 0:3:foo\n"
name: "zzzzz-4zz18-abcd6fx123409f7 used to search with any"
upload_sandbox:
uuid: zzzzz-4zz18-js48y3ykkfdfjd3
upload_sandbox:
uuid: zzzzz-4zz18-js48y3ykkfdfjd3
updated_at: 2014-12-09 15:03:16
manifest_text: ''
name: upload sandbox
updated_at: 2014-12-09 15:03:16
manifest_text: ''
name: upload sandbox
collection_with_unique_words_to_test_full_text_search:
uuid: zzzzz-4zz18-mnt690klmb51aud
collection_with_unique_words_to_test_full_text_search:
uuid: zzzzz-4zz18-mnt690klmb51aud
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: collection_with_some_unique_words
description: The quick_brown_fox jumps over the lazy_dog
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: collection_with_some_unique_words
description: The quick_brown_fox jumps over the lazy_dog
replication_undesired_unconfirmed:
uuid: zzzzz-4zz18-wjxq7uzx2m9jj4a
replication_undesired_unconfirmed:
uuid: zzzzz-4zz18-wjxq7uzx2m9jj4a
updated_at: 2015-02-07 00:19:28.596236608 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: replication want=null have=null
updated_at: 2015-02-07 00:19:28.596236608 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: replication want=null have=null
replication_desired_2_unconfirmed:
uuid: zzzzz-4zz18-3t236wrz4769h7x
replication_desired_2_unconfirmed:
uuid: zzzzz-4zz18-3t236wrz4769h7x
updated_at: 2015-02-07 00:21:35.050126576 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: replication want=2 have=null
updated_at: 2015-02-07 00:21:35.050126576 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: replication want=2 have=null
replication_desired_2_confirmed_2:
uuid: zzzzz-4zz18-434zv1tnnf2rygp
replication_desired_2_confirmed_2:
uuid: zzzzz-4zz18-434zv1tnnf2rygp
updated_at: 2015-02-07 00:24:52.983381227 Z
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 37b51d194a7513e45b56f6524f2d51f2+3 0:3:foo 3:3:bar\n"
name: replication want=2 have=2
updated_at: 2015-02-07 00:24:52.983381227 Z
manifest_text: ". acbd18db4cc2f85cedef654fccc4a4d8+3 37b51d194a7513e45b56f6524f2d51f2+3 0:3:foo 3:3:bar\n"
name: replication want=2 have=2
storage_classes_desired_default_unconfirmed:
uuid: zzzzz-4zz18-3t236wrz4769tga
storage_classes_desired_default_unconfirmed:
uuid: zzzzz-4zz18-3t236wrz4769tga
updated_at: 2015-02-07 00:21:35.050126576 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: storage classes want=[default] have=[]
updated_at: 2015-02-07 00:21:35.050126576 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: storage classes want=[default] have=[]
storage_classes_desired_default_confirmed_default:
uuid: zzzzz-4zz18-3t236wr12769tga
storage_classes_desired_default_confirmed_default:
uuid: zzzzz-4zz18-3t236wr12769tga
updated_at: 2015-02-07 00:21:35.050126576 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: storage classes want=[default] have=[default]
updated_at: 2015-02-07 00:21:35.050126576 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: storage classes want=[default] have=[default]
storage_classes_desired_archive_confirmed_default:
uuid: zzzzz-4zz18-3t236wr12769qqa
storage_classes_desired_archive_confirmed_default:
uuid: zzzzz-4zz18-3t236wr12769qqa
updated_at: 2015-02-07 00:21:35.050126576 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: storage classes want=[archive] have=[default]
updated_at: 2015-02-07 00:21:35.050126576 Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: storage classes want=[archive] have=[default]
collection_with_empty_properties:
uuid: zzzzz-4zz18-emptyproperties
collection_with_empty_properties:
uuid: zzzzz-4zz18-emptyproperties
updated_at: 2014-02-03T17:22:54Z
name: collection_with_repeated_filenames_and_contents_in_two_dirs_2
manifest_text: "./dir1 92b53930db60fe94be2a73fc771ba921+34 0:12:alice 12:12:alice.txt 24:10:carol.txt\n./dir2 56ac2557b1ded11ccab7293dc47d1e88+44 0:27:alice.txt\n"
updated_at: 2014-02-03T17:22:54Z
name: collection_with_repeated_filenames_and_contents_in_two_dirs_2
manifest_text: "./dir1 92b53930db60fe94be2a73fc771ba921+34 0:12:alice 12:12:alice.txt 24:10:carol.txt\n./dir2 56ac2557b1ded11ccab7293dc47d1e88+44 0:27:alice.txt\n"
foo_and_bar_files_in_dir:
uuid: zzzzz-4zz18-foonbarfilesdir
foo_and_bar_files_in_dir:
uuid: zzzzz-4zz18-foonbarfilesdir
updated_at: 2014-02-03T17:22:54Z
name: foo_file_in_dir
manifest_text: "./dir1 3858f62230ac3c915f300c664312c63f+6 3:3:bar 0:3:foo\n"
updated_at: 2014-02-03T17:22:54Z
name: foo_file_in_dir
manifest_text: "./dir1 3858f62230ac3c915f300c664312c63f+6 3:3:bar 0:3:foo\n"
multi_level_to_combine:
uuid: zzzzz-4zz18-pyw8yp9g3ujh45f
multi_level_to_combine:
uuid: zzzzz-4zz18-pyw8yp9g3ujh45f
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 85877ca2d7e05498dd3d109baf2df106+95 0:0:file1 0:0:file2 0:0:file3\n./dir1 85877ca2d7e05498dd3d109baf2df106+95 0:0:file1 0:0:file2 0:0:file3\n./dir1/subdir 85877ca2d7e05498dd3d109baf2df106+95 0:0:file1 0:0:file2 0:0:file3\n./dir2 85877ca2d7e05498dd3d109baf2df106+95 0:0:file1 0:0:file2 0:0:file3\n"
name: multi_level_to_combine
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 85877ca2d7e05498dd3d109baf2df106+95 0:0:file1 0:0:file2 0:0:file3\n./dir1 85877ca2d7e05498dd3d109baf2df106+95 0:0:file1 0:0:file2 0:0:file3\n./dir1/subdir 85877ca2d7e05498dd3d109baf2df106+95 0:0:file1 0:0:file2 0:0:file3\n./dir2 85877ca2d7e05498dd3d109baf2df106+95 0:0:file1 0:0:file2 0:0:file3\n"
name: multi_level_to_combine
# collection with several file types to test view icon enabled state in collection show page
collection_with_several_supported_file_types:
# collection with several file types to test view icon enabled state in collection show page
collection_with_several_supported_file_types:
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file.csv 0:0:file.fa 0:0:file.fasta 0:0:file.gif 0:0:file.json 0:0:file.md 0:0:file.pdf 0:0:file.py 0:0:file.R 0:0:file.sam 0:0:file.sh 0:0:file.tiff 0:0:file.tsv 0:0:file.txt 0:0:file.vcf 0:0:file.xml 0:0:file.xsl 0:0:file.yml\n"
name: collection_with_several_supported_file_types
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file.csv 0:0:file.fa 0:0:file.fasta 0:0:file.gif 0:0:file.json 0:0:file.md 0:0:file.pdf 0:0:file.py 0:0:file.R 0:0:file.sam 0:0:file.sh 0:0:file.tiff 0:0:file.tsv 0:0:file.txt 0:0:file.vcf 0:0:file.xml 0:0:file.xsl 0:0:file.yml\n"
name: collection_with_several_supported_file_types
collection_with_several_unsupported_file_types:
uuid: zzzzz-4zz18-supportedtypes2
collection_with_several_unsupported_file_types:
uuid: zzzzz-4zz18-supportedtypes2
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file 0:0:file.bam\n"
name: collection_with_several_unsupported_file_types
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file 0:0:file.bam\n"
name: collection_with_several_unsupported_file_types
collection_not_readable_by_active:
uuid: zzzzz-4zz18-cd42uwvy3neko21
collection_not_readable_by_active:
uuid: zzzzz-4zz18-cd42uwvy3neko21
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: collection_not_readable_by_active
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". 37b51d194a7513e45b56f6524f2d51f2+3 0:3:bar\n"
name: collection_not_readable_by_active
collection_to_remove_and_rename_files:
uuid: zzzzz-4zz18-a21ux3541sxa8sf
collection_to_remove_and_rename_files:
uuid: zzzzz-4zz18-a21ux3541sxa8sf
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2\n"
name: collection to remove and rename files
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2\n"
name: collection to remove and rename files
collection_with_tags_owned_by_active:
uuid: zzzzz-4zz18-taggedcolletion
collection_with_tags_owned_by_active:
uuid: zzzzz-4zz18-taggedcolletion
is_trashed: true
trash_at: 2001-01-01T00:00:00Z
delete_at: 2038-01-01T00:00:00Z
is_trashed: true
trash_at: 2001-01-01T00:00:00Z
delete_at: 2038-01-01T00:00:00Z
same_name_as_trashed_coll_to_test_name_conflict_on_untrash:
uuid: zzzzz-4zz18-namesameastrash
same_name_as_trashed_coll_to_test_name_conflict_on_untrash:
uuid: zzzzz-4zz18-namesameastrash
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2\n"
name: same name for trashed and persisted collections
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2\n"
name: same name for trashed and persisted collections
collection_in_trashed_subproject:
uuid: zzzzz-4zz18-trashedproj2col
collection_in_trashed_subproject:
uuid: zzzzz-4zz18-trashedproj2col
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2\n"
name: collection in trashed subproject
updated_at: 2014-02-03T17:22:54Z
manifest_text: ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:file1 0:0:file2\n"
name: collection in trashed subproject
collection_with_prop1_value1:
uuid: zzzzz-4zz18-withprop1value1
collection_with_prop1_value1:
uuid: zzzzz-4zz18-withprop1value1
owner_uuid: zzzzz-j7d0g-0010collections
created_at: <%= i.minute.ago.to_s(:db) %>
modified_at: <%= i.minute.ago.to_s(:db) %>
owner_uuid: zzzzz-j7d0g-0010collections
created_at: <%= i.minute.ago.to_s(:db) %>
modified_at: <%= i.minute.ago.to_s(:db) %>
<% end %>
# collections in project_with_201_collections
<% end %>
# collections in project_with_201_collections
owner_uuid: zzzzz-j7d0g-0201collections
created_at: <%= i.minute.ago.to_s(:db) %>
modified_at: <%= i.minute.ago.to_s(:db) %>
owner_uuid: zzzzz-j7d0g-0201collections
created_at: <%= i.minute.ago.to_s(:db) %>
modified_at: <%= i.minute.ago.to_s(:db) %>
<% end %>
# Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper
<% end %>
# Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper
cwd: test
output_path: test
command: ["echo", "hello"]
cwd: test
output_path: test
command: ["echo", "hello"]
+ runtime_status:
+ hello: world
runtime_constraints:
ram: 12000000000
vcpus: 4
runtime_constraints:
ram: 12000000000
vcpus: 4
last_ping_at: <%= 1.minute.ago.to_s(:db) %>
first_ping_at: <%= 23.hour.ago.to_s(:db) %>
job_uuid: zzzzz-8i9sb-2gx6rz0pjl033w3 # nearly_finished_job
last_ping_at: <%= 1.minute.ago.to_s(:db) %>
first_ping_at: <%= 23.hour.ago.to_s(:db) %>
job_uuid: zzzzz-8i9sb-2gx6rz0pjl033w3 # nearly_finished_job
info:
ping_secret: "48dpm3b8ijyj3jkr2yczxw0844dqd2752bhll7klodvgz9bg80"
slurm_state: "alloc"
info:
ping_secret: "48dpm3b8ijyj3jkr2yczxw0844dqd2752bhll7klodvgz9bg80"
slurm_state: "alloc"
last_ping_at: <%= 1.hour.ago.to_s(:db) %>
first_ping_at: <%= 23.hour.ago.to_s(:db) %>
job_uuid: ~
last_ping_at: <%= 1.hour.ago.to_s(:db) %>
first_ping_at: <%= 23.hour.ago.to_s(:db) %>
job_uuid: ~
info:
ping_secret: "2k3i71depad36ugwmlgzilbi4e8n0illb2r8l4efg9mzkb3a1k"
info:
ping_secret: "2k3i71depad36ugwmlgzilbi4e8n0illb2r8l4efg9mzkb3a1k"
last_ping_at: ~
first_ping_at: ~
job_uuid: ~
last_ping_at: ~
first_ping_at: ~
job_uuid: ~
info:
ping_secret: "abcdyi0x4lb5q4gzqqtrnq30oyj08r8dtdimmanbqw49z1anz2"
info:
ping_secret: "abcdyi0x4lb5q4gzqqtrnq30oyj08r8dtdimmanbqw49z1anz2"
last_ping_at: ~
first_ping_at: ~
job_uuid: ~
last_ping_at: ~
first_ping_at: ~
job_uuid: ~
info:
ping_secret: "abcdyi0x4lb5q4gzqqtrnq30oyj08r8dtdimmanbqw49z1anz2"
info:
ping_secret: "abcdyi0x4lb5q4gzqqtrnq30oyj08r8dtdimmanbqw49z1anz2"
last_ping_at: ~
first_ping_at: ~
job_uuid: ~
last_ping_at: ~
first_ping_at: ~
job_uuid: ~
info:
ping_secret: "abcdyefg4lb5q4gzqqtrnq30oyj08r8dtdimmanbqw49z1anz2"
info:
ping_secret: "abcdyefg4lb5q4gzqqtrnq30oyj08r8dtdimmanbqw49z1anz2"
class IndexTest < ActionDispatch::PerformanceTest
def test_links_index
class IndexTest < ActionDispatch::PerformanceTest
def test_links_index
- get '/arvados/v1/links', {format: :json}, auth(:admin)
+ get '/arvados/v1/links', params: {format: :json}, headers: auth(:admin)
end
def test_links_index_with_filters
end
def test_links_index_with_filters
- get '/arvados/v1/links', {format: :json, filters: [%w[head_uuid is_a arvados#collection]].to_json}, auth(:admin)
+ get '/arvados/v1/links',
+ params: {format: :json, filters: [%w[head_uuid is_a arvados#collection]].to_json},
+ headers: auth(:admin)
end
def test_collections_index
end
def test_collections_index
- get '/arvados/v1/collections', {format: :json}, auth(:admin)
+ get '/arvados/v1/collections', params: {format: :json}, headers: auth(:admin)
all_tables = ActiveRecord::Base.connection.tables
all_tables.delete 'schema_migrations'
all_tables.delete 'permission_refresh_lock'
all_tables = ActiveRecord::Base.connection.tables
all_tables.delete 'schema_migrations'
all_tables.delete 'permission_refresh_lock'
+ all_tables.delete 'ar_internal_metadata'
all_tables.each do |table|
table_class = table.classify.constantize
all_tables.each do |table|
table_class = table.classify.constantize
runtime_status: {'warning' => 'This is not an error'},
progress: 0.15})
c_faster_started_second.update_attributes!({state: Container::Locked})
runtime_status: {'warning' => 'This is not an error'},
progress: 0.15})
c_faster_started_second.update_attributes!({state: Container::Locked})
+ assert_equal 0, Container.where("runtime_status->'error' is not null").count
c_faster_started_second.update_attributes!({state: Container::Running,
runtime_status: {'error' => 'Something bad happened'},
progress: 0.2})
c_faster_started_second.update_attributes!({state: Container::Running,
runtime_status: {'error' => 'Something bad happened'},
progress: 0.2})
+ assert_equal 1, Container.where("runtime_status->'error' is not null").count
reused = Container.find_reusable(common_attrs)
assert_not_nil reused
# Selected the non-failing container even if it's the one with less progress done
reused = Container.find_reusable(common_attrs)
assert_not_nil reused
# Selected the non-failing container even if it's the one with less progress done
begin
pid = Process.fork do
begin
begin
pid = Process.fork do
begin
- # Abandon database connections inherited from parent
- # process. Credit to
- # https://github.com/kstephens/rails_is_forked
- ActiveRecord::Base.connection_handler.connection_pools.each_value do |pool|
- pool.instance_eval do
- @reserved_connections = {}
- @connections = []
- end
- end
- ActiveRecord::Base.establish_connection
-
dispatch = CrunchDispatch.new
dispatch.stubs(:did_recently).returns true
dispatch.run []
dispatch = CrunchDispatch.new
dispatch.stubs(:did_recently).returns true
dispatch.run []
test 'enable legacy api configuration option = auto, has jobs' do
Rails.configuration.enable_legacy_jobs_api = "auto"
test 'enable legacy api configuration option = auto, has jobs' do
Rails.configuration.enable_legacy_jobs_api = "auto"
+ assert Job.count > 0
+ assert_equal [], Rails.configuration.disable_api_methods
check_enable_legacy_jobs_api
assert_equal [], Rails.configuration.disable_api_methods
end
check_enable_legacy_jobs_api
assert_equal [], Rails.configuration.disable_api_methods
end
act_as_system_user do
Job.destroy_all
end
act_as_system_user do
Job.destroy_all
end
- puts "ZZZ #{Job.count}"
+ assert_equal 0, Job.count
+ assert_equal [], Rails.configuration.disable_api_methods
check_enable_legacy_jobs_api
assert_equal Disable_jobs_api_method_list, Rails.configuration.disable_api_methods
end
check_enable_legacy_jobs_api
assert_equal Disable_jobs_api_method_list, Rails.configuration.disable_api_methods
end