debian-mirror-gitlab/debian/tests/spec

35 lines
789 B
Text
Raw Normal View History

2016-09-15 21:33:05 +05:30
#!/bin/sh
2016-09-18 20:24:51 +05:30
export SOURCE_TREE=${PWD}
2016-09-15 21:33:05 +05:30
if [ -z "$ADTTMP" ]; then
ADTTMP=$(mktemp -d)
cleanup() {
rm -rf "$ADTTMP"
}
trap cleanup INT TERM EXIT
fi
cd $ADTTMP
exec 2>&1
set -ex
cd /usr/share/gitlab
2016-09-17 15:33:46 +05:30
su gitlab -c 'truncate -s 0 Gemfile.lock'
2016-09-15 21:33:05 +05:30
export $(cat /etc/gitlab/gitlab-debian.conf)
export INCLUDE_TEST_DEPENDS="true"
2016-09-18 19:41:30 +05:30
su gitlab -c "bundle install --local"
2016-11-30 14:38:34 +05:30
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"
2016-09-18 20:24:51 +05:30
su gitlab -c "bundle exec rake -f ${SOURCE_TREE}/debian/tests/spec.rake"
2016-09-16 00:02:48 +05:30
#config 2/2 failed, controllers many failed