diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-04-05 12:08:04 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-04-05 12:08:04 +0200 |
commit | 8d012198778fee5b76b777c1a18b60bde62d6f8e (patch) | |
tree | fd074ad13a2a7f7050a5d86d6cf9632529087527 /spec/migrations | |
parent | dbee81480b6a2a88535a0b042012c9fbf287e32b (diff) | |
download | gitlab-ce-8d012198778fee5b76b777c1a18b60bde62d6f8e.tar.gz |
Update entities in pipeline stages migration test
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/reschedule_builds_stages_migration_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/migrations/reschedule_builds_stages_migration_spec.rb b/spec/migrations/reschedule_builds_stages_migration_spec.rb index ae432f7338f..3bfd9dd9f6b 100644 --- a/spec/migrations/reschedule_builds_stages_migration_spec.rb +++ b/spec/migrations/reschedule_builds_stages_migration_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' require Rails.root.join('db', 'post_migrate', '20180405101928_reschedule_builds_stages_migration') describe RescheduleBuildsStagesMigration, :sidekiq, :migration do + let(:namespaces) { table(:namespaces) } let(:projects) { table(:projects) } let(:pipelines) { table(:ci_pipelines) } let(:stages) { table(:ci_stages) } @@ -10,7 +11,8 @@ describe RescheduleBuildsStagesMigration, :sidekiq, :migration do before do stub_const("#{described_class}::BATCH_SIZE", 1) - projects.create!(id: 123, name: 'gitlab', path: 'gitlab-ce') + namespaces.create(id: 12, name: 'gitlab-org', path: 'gitlab-org') + projects.create!(id: 123, namespace_id: 12, name: 'gitlab', path: 'gitlab') pipelines.create!(id: 1, project_id: 123, ref: 'master', sha: 'adf43c3a') stages.create!(id: 1, project_id: 123, pipeline_id: 1, name: 'test') |