Merge branch 'master' into 4062-infinite-scroll-repeat-issue
authorradhika <radhika@curoverse.com>
Fri, 17 Oct 2014 03:28:29 +0000 (23:28 -0400)
committerradhika <radhika@curoverse.com>
Fri, 17 Oct 2014 03:28:29 +0000 (23:28 -0400)
Conflicts:
services/api/test/fixtures/collections.yml
services/api/test/fixtures/jobs.yml

1  2 
apps/workbench/test/test_helper.rb
services/api/test/fixtures/api_client_authorizations.yml
services/api/test/fixtures/collections.yml
services/api/test/fixtures/jobs.yml
services/api/test/fixtures/links.yml
services/api/test/fixtures/pipeline_instances.yml
services/api/test/fixtures/users.yml

index eea81d1b775d2cc29ac07c877a2ff009f5858456,01a79bbe779aba2ae7fe22af4997f051d95d8d03..d7fff5de704a58a759b7016d4d66cb75ee4d2ba1
@@@ -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
  
index abc1eea9cbb83ca1db507fcb58f7f0de30573f94,e1e568aa1b0c26e16d3f6464e1a00980168abed2..c481424d6d29160778ee7843f2da9bb4a65994a8
@@@ -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
index abcaad1ac904ecdcae1af6d1fa8e81b46904a510,5e383ed5c0455ac37e37c0ef1a7811a10e57598c..292c27e2e37057848050f2d81da7e79d89eb0d53
@@@ -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
Simple merge
Simple merge