run tests in test mode
This commit is contained in:
parent
75ded92652
commit
653f70569c
3 changed files with 16 additions and 5 deletions
5
debian/conf/database.yml
vendored
5
debian/conf/database.yml
vendored
|
@ -40,7 +40,8 @@ staging:
|
|||
test: &test
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
database: gitlabhq_test
|
||||
host: /var/run/postgresql
|
||||
database: gitlab_test
|
||||
pool: 5
|
||||
username: postgres
|
||||
#username: postgres
|
||||
password:
|
||||
|
|
7
debian/conf/gitlab.yml.example
vendored
7
debian/conf/gitlab.yml.example
vendored
|
@ -399,15 +399,16 @@ test:
|
|||
# When you run tests we clone and setup gitlab-shell
|
||||
# In order to setup it correctly you need to specify
|
||||
# your system username you use to run GitLab
|
||||
# user: YOUR_USERNAME
|
||||
user: gitlab
|
||||
satellites:
|
||||
path: tmp/tests/gitlab-satellites/
|
||||
backup:
|
||||
path: tmp/tests/backups
|
||||
gitlab_shell:
|
||||
path: tmp/tests/gitlab-shell/
|
||||
path: /usr/share/gitlab-shell/
|
||||
repos_path: tmp/tests/repositories/
|
||||
hooks_path: tmp/tests/gitlab-shell/hooks/
|
||||
hooks_path: /usr/share/gitlab-shell/hooks/
|
||||
secret_file: tmp/tests/gitlab-shell/.gitlab_shell_secret
|
||||
issues_tracker:
|
||||
redmine:
|
||||
title: "Redmine"
|
||||
|
|
9
debian/tests/spec
vendored
9
debian/tests/spec
vendored
|
@ -21,5 +21,14 @@ su gitlab -c 'truncate -s 0 Gemfile.lock'
|
|||
export $(cat /etc/gitlab/gitlab-debian.conf)
|
||||
export INCLUDE_TEST_DEPENDS="true"
|
||||
su gitlab -c "bundle install --local"
|
||||
su gitlab -c "mkdir -p tmp/tests/gitlab-shell"
|
||||
export RAILS_ENV=test
|
||||
export dbname=gitlab_test
|
||||
su postgres -c "createdb $dbname"
|
||||
# enable the pg_trgm extension
|
||||
su postgres -c "psql -d $dbname -c \"CREATE EXTENSION IF NOT EXISTS pg_trgm;\"" || {
|
||||
exit 1
|
||||
}
|
||||
su gitlab -c "bundle exec rake db:migrate"
|
||||
su gitlab -c "bundle exec rake -f ${SOURCE_TREE}/debian/tests/spec.rake"
|
||||
#config 2/2 failed, controllers many failed
|
||||
|
|
Loading…
Reference in a new issue