diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-23 14:50:36 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-23 14:50:36 +0000 |
commit | c2b8063fdabbd3c77d086d7dc80890eacebbaf65 (patch) | |
tree | ffa89eb3a7da5601dff695d67bd6ec71e9602355 /db | |
parent | bc16d7679b841e30258483013414d79990a1880a (diff) | |
parent | cee66810f88ad7ba622c05529b2163e1d38b1b0f (diff) | |
download | gitlab-ce-c2b8063fdabbd3c77d086d7dc80890eacebbaf65.tar.gz |
Merge branch 'fix/database-seeds' into 'master'
Fix database seeds for development environment
## What does this MR do?
This MR fixes database seeds for development environment and adds CI test for it.
## Why was this MR needed?
Database seeds for development environment are often broken, and we are not able to catch that when someone modified `db/fixtures` and forgets to reseed database.
Closes #22422
See merge request !6475
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/04_project.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb index e3316ecdb6c..a984eda5ab5 100644 --- a/db/fixtures/development/04_project.rb +++ b/db/fixtures/development/04_project.rb @@ -3,11 +3,11 @@ require 'sidekiq/testing' Sidekiq::Testing.inline! do Gitlab::Seeder.quiet do project_urls = [ - 'https://github.com/documentcloud/underscore.git', + 'https://gitlab.com/gitlab-org/gitlab-test.git', 'https://gitlab.com/gitlab-org/gitlab-ce.git', 'https://gitlab.com/gitlab-org/gitlab-ci.git', 'https://gitlab.com/gitlab-org/gitlab-shell.git', - 'https://gitlab.com/gitlab-org/gitlab-test.git', + 'https://github.com/documentcloud/underscore.git', 'https://github.com/twitter/flight.git', 'https://github.com/twitter/typeahead.js.git', 'https://github.com/h5bp/html5-boilerplate.git', @@ -38,12 +38,7 @@ Sidekiq::Testing.inline! do ] # You can specify how many projects you need during seed execution - size = if ENV['SIZE'].present? - ENV['SIZE'].to_i - else - 8 - end - + size = ENV['SIZE'].present? ? ENV['SIZE'].to_i : 8 project_urls.first(size).each_with_index do |url, i| group_path, project_path = url.split('/')[-2..-1] |