use su instead of sudo
This commit is contained in:
parent
fa561738d8
commit
62fe446e36
2 changed files with 5 additions and 15 deletions
10
debian/tests/control
vendored
10
debian/tests/control
vendored
|
@ -1,15 +1,5 @@
|
||||||
Test-Command: gem2deb-test-runner --autopkgtest 2>&1
|
|
||||||
Depends: @, gem2deb-test-runner
|
|
||||||
#FIXME: add to Depends ruby-rspec, ruby-test-unit... if needed
|
|
||||||
#Restrictions: allow-stderr
|
|
||||||
|
|
||||||
#FIXME: replace LIB by the name of the main file of the library
|
|
||||||
#Test-Command: ruby -r LIB -e "puts true"
|
|
||||||
#Depends: @
|
|
||||||
|
|
||||||
Tests: setup
|
Tests: setup
|
||||||
Depends: @,
|
Depends: @,
|
||||||
sudo,
|
|
||||||
ruby-factory-girl-rails,
|
ruby-factory-girl-rails,
|
||||||
ruby-rspec-rails,
|
ruby-rspec-rails,
|
||||||
ruby-rspec-retry,
|
ruby-rspec-retry,
|
||||||
|
|
10
debian/tests/setup
vendored
10
debian/tests/setup
vendored
|
@ -14,7 +14,7 @@ exec 2>&1
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
cd /usr/share/gitlab
|
cd /usr/share/gitlab
|
||||||
sudo truncate -s 0 Gemfile.lock
|
su gitlab -c 'truncate -s 0 Gemfile.lock'
|
||||||
if ! grep factory_girl_rails Gemfile >/dev/null; then
|
if ! grep factory_girl_rails Gemfile >/dev/null; then
|
||||||
cp Gemfile ${ADTTMP}
|
cp Gemfile ${ADTTMP}
|
||||||
cat <<EOF >> ${ADTTMP}/Gemfile
|
cat <<EOF >> ${ADTTMP}/Gemfile
|
||||||
|
@ -29,12 +29,12 @@ gem 'email_spec', '~> 1.6'
|
||||||
gem 'ffaker', '~> 2.0'
|
gem 'ffaker', '~> 2.0'
|
||||||
gem 'json-schema', '~> 2.6', '>= 2.6.2'
|
gem 'json-schema', '~> 2.6', '>= 2.6.2'
|
||||||
EOF
|
EOF
|
||||||
sudo cp ${ADTTMP}/Gemfile .
|
su gitlab -c "cp ${ADTTMP}/Gemfile ."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export $(cat /etc/gitlab/gitlab-debian.conf)
|
export $(cat /etc/gitlab/gitlab-debian.conf)
|
||||||
sudo -u gitlab -E -H bundle install --local
|
su gitlab -c "bundle install --local"
|
||||||
sudo -u gitlab -E -H bundle exec rspec spec/uploaders spec/routing spec/views \
|
su gitlab -c "bundle exec rspec spec/uploaders spec/routing spec/views \
|
||||||
spec/factories_spec.rb spec/finders
|
spec/factories_spec.rb spec/finders"
|
||||||
|
|
||||||
#config 2/2 failed, controllers many failed
|
#config 2/2 failed, controllers many failed
|
||||||
|
|
Loading…
Reference in a new issue