diff options
Diffstat (limited to 'spec/workers/gitlab/github_import')
7 files changed, 8 insertions, 20 deletions
diff --git a/spec/workers/gitlab/github_import/import_diff_note_worker_spec.rb b/spec/workers/gitlab/github_import/import_diff_note_worker_spec.rb index 6476d82eb85..34073d0ea39 100644 --- a/spec/workers/gitlab/github_import/import_diff_note_worker_spec.rb +++ b/spec/workers/gitlab/github_import/import_diff_note_worker_spec.rb @@ -34,7 +34,7 @@ RSpec.describe Gitlab::GithubImport::ImportDiffNoteWorker do expect(importer) .to receive(:execute) - expect(worker.counter) + expect(Gitlab::GithubImport::ObjectCounter) .to receive(:increment) .and_call_original diff --git a/spec/workers/gitlab/github_import/import_issue_worker_spec.rb b/spec/workers/gitlab/github_import/import_issue_worker_spec.rb index 9f5bd1d9e5e..dc0338eccad 100644 --- a/spec/workers/gitlab/github_import/import_issue_worker_spec.rb +++ b/spec/workers/gitlab/github_import/import_issue_worker_spec.rb @@ -37,7 +37,7 @@ RSpec.describe Gitlab::GithubImport::ImportIssueWorker do expect(importer) .to receive(:execute) - expect(worker.counter) + expect(Gitlab::GithubImport::ObjectCounter) .to receive(:increment) .and_call_original diff --git a/spec/workers/gitlab/github_import/import_note_worker_spec.rb b/spec/workers/gitlab/github_import/import_note_worker_spec.rb index 94bc8e26e4a..bc254e6246d 100644 --- a/spec/workers/gitlab/github_import/import_note_worker_spec.rb +++ b/spec/workers/gitlab/github_import/import_note_worker_spec.rb @@ -32,7 +32,7 @@ RSpec.describe Gitlab::GithubImport::ImportNoteWorker do expect(importer) .to receive(:execute) - expect(worker.counter) + expect(Gitlab::GithubImport::ObjectCounter) .to receive(:increment) .and_call_original diff --git a/spec/workers/gitlab/github_import/import_pull_request_merged_by_worker_spec.rb b/spec/workers/gitlab/github_import/import_pull_request_merged_by_worker_spec.rb index c799c676300..728b4c6b440 100644 --- a/spec/workers/gitlab/github_import/import_pull_request_merged_by_worker_spec.rb +++ b/spec/workers/gitlab/github_import/import_pull_request_merged_by_worker_spec.rb @@ -12,12 +12,4 @@ RSpec.describe Gitlab::GithubImport::ImportPullRequestMergedByWorker do describe '#importer_class' do it { expect(subject.importer_class).to eq(Gitlab::GithubImport::Importer::PullRequestMergedByImporter) } end - - describe '#counter_name' do - it { expect(subject.counter_name).to eq(:github_importer_imported_pull_requests_merged_by) } - end - - describe '#counter_description' do - it { expect(subject.counter_description).to eq('The number of imported GitHub pull requests merged by') } - end end diff --git a/spec/workers/gitlab/github_import/import_pull_request_review_worker_spec.rb b/spec/workers/gitlab/github_import/import_pull_request_review_worker_spec.rb index cd14d6631d5..0607add52cd 100644 --- a/spec/workers/gitlab/github_import/import_pull_request_review_worker_spec.rb +++ b/spec/workers/gitlab/github_import/import_pull_request_review_worker_spec.rb @@ -12,12 +12,4 @@ RSpec.describe Gitlab::GithubImport::ImportPullRequestReviewWorker do describe '#importer_class' do it { expect(subject.importer_class).to eq(Gitlab::GithubImport::Importer::PullRequestReviewImporter) } end - - describe '#counter_name' do - it { expect(subject.counter_name).to eq(:github_importer_imported_pull_request_reviews) } - end - - describe '#counter_description' do - it { expect(subject.counter_description).to eq('The number of imported GitHub pull request reviews') } - end end diff --git a/spec/workers/gitlab/github_import/import_pull_request_worker_spec.rb b/spec/workers/gitlab/github_import/import_pull_request_worker_spec.rb index 1238929fbcb..6fe9741075f 100644 --- a/spec/workers/gitlab/github_import/import_pull_request_worker_spec.rb +++ b/spec/workers/gitlab/github_import/import_pull_request_worker_spec.rb @@ -43,7 +43,7 @@ RSpec.describe Gitlab::GithubImport::ImportPullRequestWorker do expect(importer) .to receive(:execute) - expect(worker.counter) + expect(Gitlab::GithubImport::ObjectCounter) .to receive(:increment) .and_call_original diff --git a/spec/workers/gitlab/github_import/stage/finish_import_worker_spec.rb b/spec/workers/gitlab/github_import/stage/finish_import_worker_spec.rb index 2615da2be15..8dea24dc74f 100644 --- a/spec/workers/gitlab/github_import/stage/finish_import_worker_spec.rb +++ b/spec/workers/gitlab/github_import/stage/finish_import_worker_spec.rb @@ -33,6 +33,10 @@ RSpec.describe Gitlab::GithubImport::Stage::FinishImportWorker do message: 'GitHub project import finished', import_stage: 'Gitlab::GithubImport::Stage::FinishImportWorker', import_source: :github, + object_counts: { + 'fetched' => {}, + 'imported' => {} + }, project_id: project.id, duration_s: a_kind_of(Numeric) ) |