Commit ad88e3f8 authored by Stan Hu's avatar Stan Hu

Fix `rake db:seed_fu` not doing anything in CI

The default behavior of seed_fu is to load the fixtures using the RAILS_ENV
environment.  In CI, since we set RAILS_ENV=test, nothing is ever
loaded. Instead of `rake db:seed_fu`, use `rake gitlab:setup`, which sets up
MySQL properly with limits.

Closes #41517
parent ff077cf7
......@@ -517,10 +517,12 @@ db:rollback-mysql:
SIZE: "1"
SETUP_DB: "false"
CREATE_DB_USER: "true"
FIXTURE_PATH: db/fixtures/development
script:
- git clone https://gitlab.com/gitlab-org/gitlab-test.git
/home/git/repositories/gitlab-org/gitlab-test.git
- bundle exec rake db:setup db:seed_fu
- scripts/gitaly-test-spawn
- force=yes bundle exec rake gitlab:setup
artifacts:
when: on_failure
expire_in: 1d
......
......@@ -8,7 +8,7 @@ end
module Gitlab
class Seeder
def self.quiet
mute_mailer unless Rails.env.test?
mute_mailer
SeedFu.quiet = true
......
#!/bin/bash
mysql --user=root --host=mysql <<EOF
CREATE DATABASE IF NOT EXISTS gitlabhq_test;
CREATE DATABASE IF NOT EXISTS gitlabhq_test DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
CREATE USER IF NOT EXISTS 'gitlab'@'%';
GRANT ALL PRIVILEGES ON gitlabhq_test.* TO 'gitlab'@'%';
FLUSH PRIVILEGES;
......
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