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
Merge requests
!1655
Resolve "fix install tests"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "fix install tests"
1960-fix-install-tests
into
master
Overview
0
Commits
13
Pipelines
7
Changes
1
Merged
Piotr Gawron
requested to merge
1960-fix-install-tests
into
master
1 year ago
Overview
0
Commits
13
Pipelines
7
Changes
1
Expand
Closes
#1960 (closed)
0
0
Merge request reports
Compare
master
version 7
d928798c
1 year ago
version 6
61447426
1 year ago
version 5
e1f9256c
1 year ago
version 4
dd849d0e
1 year ago
version 3
fdda7205
1 year ago
version 2
9af8b17d
1 year ago
version 1
e43b20f9
1 year ago
master (base)
and
version 2
latest version
d928798c
13 commits,
1 year ago
version 7
d928798c
16 commits,
1 year ago
version 6
61447426
15 commits,
1 year ago
version 5
e1f9256c
11 commits,
1 year ago
version 4
dd849d0e
4 commits,
1 year ago
version 3
fdda7205
3 commits,
1 year ago
version 2
9af8b17d
2 commits,
1 year ago
version 1
e43b20f9
1 commit,
1 year ago
1 file
+
5
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
.gitlab-ci.yml
+
3
−
34
Options
@@ -480,7 +480,7 @@ test_install_debian_package:
-
echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
-
echo "deb-src http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list
-
apt-get update
-
DEBIAN_FRONTEND=noninteractive apt-get install -y ssh software-properties-common dirmngr wget curl postgresql
-
DEBIAN_FRONTEND=noninteractive apt-get install -y ssh software-properties-common dirmngr wget curl postgresql
screen
-
service postgresql start
-
debian_file=$(ls debian/*.deb)
-
echo debconf minerva/internal/skip-preseed boolean
true
| debconf-set-selections
@@ -489,46 +489,15 @@ test_install_debian_package:
-
echo debconf minerva/remote/host select localhost | debconf-set-selections
-
echo debconf minerva/db/dbname select minerva_db | debconf-set-selections
-
echo debconf minerva/db/app-user select minerva_user@localhost | debconf-set-selections
-
apt-get update
-
DEBIAN_FRONTEND=noninteractive apt-get install -y ./$debian_file
-
java -jar /usr/share/minerva/minerva.jar
&
#we need to wait a bit
for tomcat
start
-
screen -d -m
java -jar /usr/share/minerva/minerva.jar
#we need to wait a bit
- app needs to
start
-
sleep
15
-
wget http://localhost:8080/minerva/
#test if we can login and list projects
-
test 200 = $(curl -X POST -d "login=admin&password=admin" --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/)
test_deploy_with_db_without_superadmin_rights
:
image
:
maven:3.8.6-jdk-8
stage
:
test
services
:
-
postgres:9.6
dependencies
:
-
build_jar
tags
:
-
privileged
only
:
-
tags
script
:
-
apt-get update
-
DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-client
-
mkdir -p /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
-
mkdir -p /usr/share/minerva/data/
-
mv minerva.jar /usr/share/minerva/
-
java -jar /usr/share/minerva/minerva.jar
-
sleep
15
-
curl http://localhost:8080/minerva/
#test if we can login and list projects
-
test 200 = $(curl -X POST -d "login=admin&password=admin" --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/)
.test_database_template
:
&test_database_definition
image
:
maven:3.8.6-jdk-8
stage
:
test
Loading