diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/lib/gitlab/background_migration/nullify_orphan_runner_id_on_ci_builds_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/lib/gitlab/background_migration/nullify_orphan_runner_id_on_ci_builds_spec.rb')
-rw-r--r-- | spec/lib/gitlab/background_migration/nullify_orphan_runner_id_on_ci_builds_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/lib/gitlab/background_migration/nullify_orphan_runner_id_on_ci_builds_spec.rb b/spec/lib/gitlab/background_migration/nullify_orphan_runner_id_on_ci_builds_spec.rb index 90dd3e14606..e38edfc3643 100644 --- a/spec/lib/gitlab/background_migration/nullify_orphan_runner_id_on_ci_builds_spec.rb +++ b/spec/lib/gitlab/background_migration/nullify_orphan_runner_id_on_ci_builds_spec.rb @@ -5,9 +5,9 @@ require 'spec_helper' RSpec.describe Gitlab::BackgroundMigration::NullifyOrphanRunnerIdOnCiBuilds, :migration, schema: 20220223112304 do let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } - let(:ci_runners) { table(:ci_runners) } - let(:ci_pipelines) { table(:ci_pipelines) } - let(:ci_builds) { table(:ci_builds) } + let(:ci_runners) { table(:ci_runners, database: :ci) } + let(:ci_pipelines) { table(:ci_pipelines, database: :ci) } + let(:ci_builds) { table(:ci_builds, database: :ci) } subject { described_class.new } @@ -26,9 +26,9 @@ RSpec.describe Gitlab::BackgroundMigration::NullifyOrphanRunnerIdOnCiBuilds, :mi describe '#perform' do let(:namespace) { namespaces.create!(name: 'test', path: 'test', type: 'Group') } let(:project) { projects.create!(namespace_id: namespace.id, name: 'test') } - let(:pipeline) { ci_pipelines.create!(project_id: project.id, ref: 'master', sha: 'adf43c3a', status: 'success') } it 'nullifies runner_id for orphan ci_builds in range' do + pipeline = ci_pipelines.create!(project_id: project.id, ref: 'master', sha: 'adf43c3a', status: 'success') ci_runners.create!(id: 2, runner_type: 'project_type') ci_builds.create!(id: 5, type: 'Ci::Build', commit_id: pipeline.id, runner_id: 2) |