3618: accommodate new fixture indexing in pipeline_instance tests (including run...
authorPhil Hodgson <bitbucket@philhodgson.net>
Tue, 4 Nov 2014 13:58:44 +0000 (14:58 +0100)
committerPhil Hodgson <bitbucket@philhodgson.net>
Tue, 4 Nov 2014 13:58:44 +0000 (14:58 +0100)
apps/workbench/test/integration/pipeline_instances_test.rb
services/api/test/fixtures/pipeline_instances.yml

index 023771ae96293ab16ef46eaebe56b80a87b843c0..6312546db078209f3354c1e7c5e3f85e1fbb506c 100644 (file)
@@ -340,11 +340,11 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
   end
 
   [
-    [1, 1*60*60 + 59*60], # run time 1 hour 59 minutes
-    [10, 19*60*60 + 50*60], # run time 19 hours and 50 minutes
+    [1, 0], # run time 0 minutes
+    [10, 17*60*60 + 51*60], # run time 17 hours and 51 minutes
   ].each do |index, run_time|
     test "pipeline start and finish time display #{index}" do
-      visit page_with_token("user1_with_load", "/pipeline_instances/zzzzz-d1hrv-10pipelines0#{(index).to_s.rjust(3, '0')}")
+      visit page_with_token("user1_with_load", "/pipeline_instances/zzzzz-d1hrv-10pipelines0#{index.to_s.rjust(3, '0')}")
 
       assert page.has_text? 'This pipeline started at'
       page_text = page.text
index 0317db362f4795634a7ba9f744a15fd0191114fc..e086f77ceb1b88b718f6d91f0c71ecd6add3d738 100644 (file)
@@ -161,9 +161,9 @@ pipeline_<%=i%>_of_10:
   state: Failed
   uuid: zzzzz-d1hrv-10pipelines0<%= i.to_s.rjust(3, '0') %>
   owner_uuid: zzzzz-j7d0g-000010pipelines
-  created_at: <%= (2*i).hour.ago.to_s(:db) %>
-  started_at: <%= (2*i).hour.ago.to_s(:db) %>
-  finished_at: <%= i.minute.ago.to_s(:db) %>
+  created_at: <%= (2*(i-1)).hour.ago.to_s(:db) %>
+  started_at: <%= (2*(i-1)).hour.ago.to_s(:db) %>
+  finished_at: <%= (i-1).minute.ago.to_s(:db) %>
   components:
     foo:
       script: foo