[DRE-commits] [gitlab] 01/05: run tests in test mode

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Wed Nov 30 13:54:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository gitlab.

commit 653f70569c844ce64393bea85078550720bc7f6e
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Wed Nov 30 14:38:34 2016 +0530

    run tests in test mode
---
 debian/conf/database.yml       | 5 +++--
 debian/conf/gitlab.yml.example | 7 ++++---
 debian/tests/spec              | 9 +++++++++
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/debian/conf/database.yml b/debian/conf/database.yml
index d8cadda..c2e2b8e 100644
--- a/debian/conf/database.yml
+++ b/debian/conf/database.yml
@@ -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:
diff --git a/debian/conf/gitlab.yml.example b/debian/conf/gitlab.yml.example
index 9f05d24..daa3f2a 100644
--- a/debian/conf/gitlab.yml.example
+++ b/debian/conf/gitlab.yml.example
@@ -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"
diff --git a/debian/tests/spec b/debian/tests/spec
index 8797163..a4c25cb 100755
--- a/debian/tests/spec
+++ b/debian/tests/spec
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git



More information about the Pkg-ruby-extras-commits mailing list