Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gitlab
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Ruby Team
gitlab
Commits
c7042f45
You need to sign in or sign up before continuing.
Commit
c7042f45
authored
4 years ago
by
Praveen Arimbrathodiyil
Browse files
Options
Downloads
Patches
Plain Diff
Run tests again and grant required database privilleges
parent
c5dab90c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
debian/tests/spec
+10
-6
10 additions, 6 deletions
debian/tests/spec
with
10 additions
and
6 deletions
debian/tests/spec
+
10
−
6
View file @
c7042f45
...
...
@@ -23,20 +23,24 @@ export RAILS_ENV=test
export
DB
=
postgres
export
INCLUDE_TEST_DEPENDS
=
"true"
# TODO: stop running autopkgtest till these gems are packaged
exit
0
echo
"Installing test only dependencies from rubygems.org..."
cp
${
SOURCE_TREE
}
/debian/Gemfile.autopkgtest
.
BUNDLE_GEMFILE
=
Gemfile.autopkgtest bundle
install
su gitlab
-c
"bundle install --local"
su gitlab
-c
"mkdir -p tmp/tests/gitlab-shell"
export
dbname
=
gitlab_test
export
gitlab_user
=
gitlab
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
}
# enable the btree_gist extension
su postgres
-c
"psql -d
$dbname
-c
\"
CREATE EXTENSION IF NOT EXISTS btree_gist;
\"
"
||
{
exit
1
}
# Allow gitlab user required permissions
su postgres
-c
"psql -c
\"
GRANT ALL on schema public TO
${
gitlab_user
}
;
\"
"
su postgres
-c
"psql -c
\"
GRANT ALL on database
${
dbname
}
TO
${
gitlab_user
}
;
\"
"
# gitlab user need to create files here
chown
-R
${
gitlab_user
}
: /usr/share/gitlab/db
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment