Skip to content
Snippets Groups Projects
Commit 54d8d314 authored by Andrejs Cunskis's avatar Andrejs Cunskis :palm_tree: Committed by Mark Lapierre
Browse files

Add test status to exported data json in large migration specs

parent b858a3cf
No related branches found
No related tags found
1 merge request!132223Add test status to exported data json in large migration specs
......@@ -6,7 +6,11 @@
# rubocop:disable Rails/Pluck
module QA
RSpec.describe 'Manage', :github, requires_admin: 'creates users', only: { job: 'large-github-import' } do
RSpec.describe 'Manage', :github, requires_admin: 'creates users',
only: { condition: -> { ENV["CI_PROJECT_NAME"] == "import-metrics" } },
custom_test_metrics: {
tags: { import_type: ENV["QA_IMPORT_TYPE"], import_repo: ENV["QA_LARGE_IMPORT_REPO"] || "rspec/rspec-core" }
} do
describe 'Project import', product_group: :import_and_integrate do # rubocop:disable RSpec/MultipleMemoizedHelpers
let(:github_repo) { ENV['QA_LARGE_IMPORT_REPO'] || 'rspec/rspec-core' }
let(:import_max_duration) { ENV['QA_LARGE_IMPORT_DURATION']&.to_i || 7200 }
......@@ -224,6 +228,7 @@ module QA
save_json(
"data",
{
status: example.exception ? "failed" : "passed",
importer: :github,
import_time: @import_time,
errors: imported_project.project_import_status[:failed_relations],
......
......@@ -4,7 +4,11 @@
# rubocop:disable Rails/Pluck, Layout/LineLength, RSpec/MultipleMemoizedHelpers
module QA
RSpec.describe "Manage", :skip_live_env, only: { job: "large-gitlab-import" } do
RSpec.describe "Manage", :skip_live_env,
only: { condition: -> { ENV["CI_PROJECT_NAME"] == "import-metrics" } },
custom_test_metrics: {
tags: { import_type: ENV["QA_IMPORT_TYPE"], import_repo: ENV["QA_LARGE_IMPORT_REPO"] || "migration-test-project" }
} do
describe "Gitlab migration", orchestrated: false, product_group: :import_and_integrate do
include_context "with gitlab group migration"
......@@ -79,6 +83,7 @@ module QA
save_json(
"data",
{
status: example.exception ? "failed" : "passed",
importer: :gitlab,
import_time: @import_time,
errors: import_failures,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment