Commit 95f0684d authored by Andrejs Cunskis's avatar Andrejs Cunskis

Update large gh import spec test data json

parent dc182687
......@@ -21,11 +21,11 @@ module QA
end
end
let(:github_repo) { ENV['QA_LARGE_GH_IMPORT_REPO'] || 'rspec/rspec-core' }
let(:import_max_duration) { ENV['QA_LARGE_GH_IMPORT_DURATION'] ? ENV['QA_LARGE_GH_IMPORT_DURATION'].to_i : 7200 }
let(:github_repo) { ENV['QA_LARGE_IMPORT_REPO'] || 'rspec/rspec-core' }
let(:import_max_duration) { ENV['QA_LARGE_IMPORT_DURATION'] ? ENV['QA_LARGE_IMPORT_DURATION'].to_i : 7200 }
let(:github_client) do
Octokit::Client.new(
access_token: ENV['QA_LARGE_GH_IMPORT_GH_TOKEN'] || Runtime::Env.github_access_token,
access_token: ENV['QA_LARGE_IMPORT_GH_TOKEN'] || Runtime::Env.github_access_token,
auto_paginate: true
)
end
......@@ -106,6 +106,7 @@ module QA
end
end
# rubocop:disable RSpec/InstanceVariable
after do |example|
user.remove_via_api! unless example.exception
next unless defined?(@import_time)
......@@ -114,20 +115,23 @@ module QA
save_json(
"data",
{
importer: :github,
import_time: @import_time,
reported_stats: @stats,
github: {
source: {
name: "GitHub",
project_name: github_repo,
branches: gh_branches.length,
commits: gh_commits.length,
labels: gh_labels.length,
milestones: gh_milestones.length,
prs: gh_prs.length,
pr_comments: gh_prs.sum { |_k, v| v[:comments].length },
mrs: gh_prs.length,
mr_comments: gh_prs.sum { |_k, v| v[:comments].length },
issues: gh_issues.length,
issue_comments: gh_issues.sum { |_k, v| v[:comments].length }
},
gitlab: {
target: {
name: "GitLab",
project_name: imported_project.path_with_namespace,
branches: gl_branches.length,
commits: gl_commits.length,
......@@ -145,6 +149,7 @@ module QA
}
)
end
# rubocop:enable RSpec/InstanceVariable
it(
'imports large Github repo via api',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment