Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
minerva
core
Commits
e01924f8
Commit
e01924f8
authored
6 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
test to check if database can be deployed without superuser privileges
parent
db564d21
No related branches found
No related tags found
3 merge requests
!469
12.1.0~beta.4 into master
,
!459
12.1.0~beta.3 into master
,
!454
Resolve "fix migration script to work on database without superadmin privileges"
Pipeline
#6775
failed
6 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+33
-0
33 additions, 0 deletions
.gitlab-ci.yml
with
33 additions
and
0 deletions
.gitlab-ci.yml
+
33
−
0
View file @
e01924f8
...
...
@@ -5,6 +5,12 @@ stages:
-
packaging
-
test
variables
:
POSTGRES_DB
:
map_viewer
POSTGRES_USER
:
map_viewer
POSTGRES_PASSWORD
:
"
123qweasdzxc"
test_frontend
:
stage
:
test
script
:
...
...
@@ -116,3 +122,30 @@ rpmlint:
-
yum -y install rpmlint
-
rpmlint rpm/rpmbuildtemp/RPMS/noarch/minerva-*.rpm
test_deploy_with_db_without_superadmin_rights
:
image
:
tomcat:7-jre8
stage
:
test
services
:
-
postgres:9.6
dependencies
:
-
build_war
tags
:
-
privileged
only
:
-
tags
script
:
-
apt-get update
-
apt-get install -y postgresql-client
-
mkdir /etc/minerva
-
echo "database.uri=jdbc:postgresql://postgres:5432/test" > /etc/minerva/db.properties
-
echo "database.username=test" >> /etc/minerva/db.properties
-
echo "database.password=test" >> /etc/minerva/db.properties
-
echo "CREATE DATABASE test;CREATE USER test WITH ENCRYPTED PASSWORD 'test';GRANT ALL PRIVILEGES ON DATABASE test TO test;" >tmp.sql
-
PGPASSWORD=$POSTGRES_PASSWORD psql -h postgres -U $POSTGRES_USER $POSTGRES_DB < tmp.sql
-
wget https://git-r3lab.uni.lu/minerva/core/-/jobs/32480/artifacts/raw/minerva.war -O /usr/local/tomcat/webapps/minerva.war
-
/usr/local/tomcat/bin/startup.sh
-
sleep
15
#test if we can login and list projects
-
test 200 = $(curl --write-out %{http_code} --silent --output /dev/null -c cookie.txt http://localhost:8080/minerva/api/doLogin)
-
test 200 = $(curl --write-out %{http_code} --silent --output /dev/null --cookie cookie.txt http://localhost:8080/minerva/api/projects/)
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