From: radhika Date: Fri, 17 Oct 2014 03:28:29 +0000 (-0400) Subject: Merge branch 'master' into 4062-infinite-scroll-repeat-issue X-Git-Tag: 1.1.0~2090^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/1f7dbdb87eee28f7f357c025f7b5cd7d1ccc8c7a Merge branch 'master' into 4062-infinite-scroll-repeat-issue Conflicts: services/api/test/fixtures/collections.yml services/api/test/fixtures/jobs.yml --- 1f7dbdb87eee28f7f357c025f7b5cd7d1ccc8c7a diff --cc apps/workbench/test/test_helper.rb index eea81d1b77,01a79bbe77..d7fff5de70 --- a/apps/workbench/test/test_helper.rb +++ b/apps/workbench/test/test_helper.rb @@@ -61,15 -63,18 +63,21 @@@ module ApiFixtureLoade begin path = File.join(ApiServerForTests::ARV_API_SERVER_DIR, 'test', 'fixtures', "#{name}.yml") - YAML.load(IO.read(path)) + file = IO.read(path) + trim_index = file.index('# Test Helper trims the rest of the file') + file = file[0, trim_index] if trim_index + YAML.load(file) end + keys.inject(@@api_fixtures[name]) { |hash, key| hash[key] } end end - def api_fixture name - self.class.api_fixture name + def api_fixture(name, *keys) + self.class.api_fixture(name, *keys) + end + + def find_fixture(object_class, name) + object_class.find(api_fixture(object_class.to_s.pluralize.underscore, + name, "uuid")) end end diff --cc services/api/test/fixtures/collections.yml index abc1eea9cb,e1e568aa1b..c481424d6d --- a/services/api/test/fixtures/collections.yml +++ b/services/api/test/fixtures/collections.yml @@@ -258,30 -258,11 +258,39 @@@ collection_owned_by_foo created_at: 2014-02-03T17:22:54Z name: collection_owned_by_foo + collection_to_remove_from_subproject: + # The Workbench tests remove this from subproject. + uuid: zzzzz-4zz18-subprojgonecoll + portable_data_hash: 2386ca6e3fffd4be5e197a72c6c80fb2+51 + manifest_text: ". 8258b505536a9ab47baa2f4281cb932a+9 0:9:missingno\n" + owner_uuid: zzzzz-j7d0g-axqo7eu9pwvna1x + created_at: 2014-10-15T10:45:00 + name: Collection to remove from subproject ++ +# Test Helper trims the rest of the file + +# Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper + +# collections in project_with_10_collections +<% for i in 1..10 do %> +collection_<%=i%>_of_10: + name: Collection_<%= i %> + portable_data_hash: ea10d51bcf88862dbcc36eb292017dfd+45 + manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n" + uuid: zzzzz-4zz18-10gneyn6brkx<%= i.to_s.rjust(3, '0') %> + owner_uuid: zzzzz-j7d0g-0010collections + created_at: <%= i.minute.ago.to_s(:db) %> +<% end %> + +# collections in project_with_201_collections +<% for i in 1..201 do %> +collection_<%=i%>_of_201: + name: Collection_<%= i %> + portable_data_hash: ea10d51bcf88862dbcc36eb292017dfd+45 + manifest_text: ". 73feffa4b7f6bb68e44cf984c85f6e88+3 0:3:baz\n" + uuid: zzzzz-4zz18-201gneyn6brd<%= i.to_s.rjust(3, '0') %> + owner_uuid: zzzzz-j7d0g-0201collections + created_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 diff --cc services/api/test/fixtures/jobs.yml index abcaad1ac9,5e383ed5c0..292c27e2e3 --- a/services/api/test/fixtures/jobs.yml +++ b/services/api/test/fixtures/jobs.yml @@@ -285,18 -285,12 +285,28 @@@ cancelled runtime_constraints: {} state: Cancelled + job_in_subproject: + uuid: zzzzz-8i9sb-subprojectjob01 + created_at: 2014-10-15 12:00:00 + owner_uuid: zzzzz-j7d0g-axqo7eu9pwvna1x + log: ~ + repository: foo + script: hash + script_version: 4fe459abe02d9b365932b8f5dc419439ab4e2577 + state: Complete ++ +# Test Helper trims the rest of the file + +# Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper + +# jobs in project_with_10_pipelines_and_200_jobs +<% for i in 1..200 do %> +job_<%=i%>_of_200: + uuid: zzzzz-8i9sb-0vsrcqi7whch<%= i.to_s.rjust(3, '0') %> + created_at: <%= i.minute.ago.to_s(:db) %> + owner_uuid: zzzzz-j7d0g-nnjobspipelines + script_version: 7def43a4d3f20789dda4700f703b5514cc3ed250 + state: Complete +<% end %> + +# Do not add your fixtures below this line as the rest of this file will be trimmed by test_helper