From 183df814d5cb49d11614acb73b07e4e2809524e2 Mon Sep 17 00:00:00 2001 From: radhika Date: Tue, 21 Oct 2014 13:48:35 -0400 Subject: [PATCH] 4227: some more test and fixture updates. --- .../test/integration/pipeline_instances_test.rb | 4 ++-- apps/workbench/test/integration/projects_test.rb | 2 +- services/api/test/fixtures/groups.yml | 4 ++-- services/api/test/fixtures/jobs.yml | 2 +- services/api/test/fixtures/pipeline_instances.yml | 12 +++++++----- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb index 7ae715a7e2..6547933994 100644 --- a/apps/workbench/test/integration/pipeline_instances_test.rb +++ b/apps/workbench/test/integration/pipeline_instances_test.rb @@ -313,9 +313,9 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest assert_not page.has_text? 'Graph' end - (1..20).each do |index| + (1..10).each do |index| test "pipeline start and finish time display #{index}" do - visit page_with_token("user1_with_load", "/pipeline_instances/zzzzz-d1hrv-25pipelines0#{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 diff --git a/apps/workbench/test/integration/projects_test.rb b/apps/workbench/test/integration/projects_test.rb index cccfd9983a..17d818d14b 100644 --- a/apps/workbench/test/integration/projects_test.rb +++ b/apps/workbench/test/integration/projects_test.rb @@ -549,7 +549,7 @@ class ProjectsTest < ActionDispatch::IntegrationTest [ ['project with 10 pipelines', 10, 0], - ['project with 200 jobs and 10 pipelines', 2, 200], + ['project with 2 pipelines and 200 jobs', 2, 200], ['project with 25 pipelines', 25, 0], ].each do |project_name, num_pipelines, num_jobs| test "scroll pipeline instances tab for #{project_name} with #{num_pipelines} pipelines and #{num_jobs} jobs" do diff --git a/services/api/test/fixtures/groups.yml b/services/api/test/fixtures/groups.yml index 61c4b0a81c..764261daea 100644 --- a/services/api/test/fixtures/groups.yml +++ b/services/api/test/fixtures/groups.yml @@ -173,7 +173,7 @@ project_with_10_pipelines: description: project with 10 pipelines group_class: project -project_with_10_pipelines_and_200_jobs: +project_with_2_pipelines_and_200_jobs: uuid: zzzzz-j7d0g-nnjobspipelines owner_uuid: zzzzz-tpzed-user1withloadab created_at: 2014-04-21 15:37:48 -0400 @@ -181,7 +181,7 @@ project_with_10_pipelines_and_200_jobs: modified_by_user_uuid: zzzzz-tpzed-user1withloadab modified_at: 2014-04-21 15:37:48 -0400 updated_at: 2014-04-21 15:37:48 -0400 - name: project with 200 jobs and 10 pipelines + name: project with 2 pipelines and 200 jobs description: This will result in two pages in the display group_class: project diff --git a/services/api/test/fixtures/jobs.yml b/services/api/test/fixtures/jobs.yml index 292c27e2e3..1381078ee1 100644 --- a/services/api/test/fixtures/jobs.yml +++ b/services/api/test/fixtures/jobs.yml @@ -299,7 +299,7 @@ job_in_subproject: # 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 +# jobs in project_with_2_pipelines_and_200_jobs <% for i in 1..200 do %> job_<%=i%>_of_200: uuid: zzzzz-8i9sb-0vsrcqi7whch<%= i.to_s.rjust(3, '0') %> diff --git a/services/api/test/fixtures/pipeline_instances.yml b/services/api/test/fixtures/pipeline_instances.yml index 09caf93d39..9a1a504289 100644 --- a/services/api/test/fixtures/pipeline_instances.yml +++ b/services/api/test/fixtures/pipeline_instances.yml @@ -158,10 +158,12 @@ pipeline_with_newer_template: <% for i in 1..10 do %> pipeline_<%=i%>_of_10: name: pipeline_<%= i %> - state: New - uuid: zzzzz-d1hrv-10gneyn6br1x<%= i.to_s.rjust(3, '0') %> + state: Failed + uuid: zzzzz-d1hrv-10pipelines0<%= i.to_s.rjust(3, '0') %> owner_uuid: zzzzz-j7d0g-000010pipelines - created_at: <%= i.minute.ago.to_s(:db) %> + created_at: <%= i.hour.ago.to_s(:db) %> + started_at: <%= i.hour.ago.to_s(:db) %> + finished_at: <%= i.minute.ago.to_s(:db) %> components: foo: script: foo @@ -173,9 +175,9 @@ pipeline_<%=i%>_of_10: title: foo instance input <% end %> -# pipelines in project_with_10_pipelines_and_200_jobs +# pipelines in project_with_2_pipelines_and_200_jobs <% for i in 1..2 do %> -pipeline_<%=i%>_of_10_pipelines_and_200_jobs: +pipeline_<%=i%>_of_2_pipelines_and_200_jobs: name: pipeline_<%= i %> state: New uuid: zzzzz-d1hrv-abcgneyn6brx<%= i.to_s.rjust(3, '0') %> -- 2.30.2