Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
portal-backend
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
HBP Medical Informatics Platform
portal-backend
Commits
844a9d00
Commit
844a9d00
authored
8 years ago
by
Mirco Nasuti
Browse files
Options
Downloads
Patches
Plain Diff
add comments and add more test data as needed by the tablesample psql function
parent
879f74c3
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/pre-test-run.sh
+8
-0
8 additions, 0 deletions
tests/pre-test-run.sh
tests/science-db/sql/values.csv
+2000
-5
2000 additions, 5 deletions
tests/science-db/sql/values.csv
with
2008 additions
and
5 deletions
tests/pre-test-run.sh
+
8
−
0
View file @
844a9d00
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
# Kill old containers
# Kill old containers
echo
"Killing old containers..."
if
[
$(
docker ps |
grep
backend-test |
wc
-l
)
-gt
0
]
;
then
if
[
$(
docker ps |
grep
backend-test |
wc
-l
)
-gt
0
]
;
then
docker
kill
backend-test
docker
kill
backend-test
fi
fi
...
@@ -16,6 +17,7 @@ fi
...
@@ -16,6 +17,7 @@ fi
# Remove old containers
# Remove old containers
echo
"Removing old containers..."
if
[
$(
docker ps
-a
|
grep
backend-test |
wc
-l
)
-gt
0
]
;
then
if
[
$(
docker ps
-a
|
grep
backend-test |
wc
-l
)
-gt
0
]
;
then
docker
rm
-f
backend-test
docker
rm
-f
backend-test
fi
fi
...
@@ -29,12 +31,14 @@ fi
...
@@ -29,12 +31,14 @@ fi
# Run databases containers
# Run databases containers
echo
"Running databases containers..."
docker run
--name
science-db-test
-p
65432:5432
-v
$(
pwd
)
/tests/science-db/sql:/docker-entrypoint-initdb.d/
-e
POSTGRES_USER
=
science
-d
postgres:9.5.3
docker run
--name
science-db-test
-p
65432:5432
-v
$(
pwd
)
/tests/science-db/sql:/docker-entrypoint-initdb.d/
-e
POSTGRES_USER
=
science
-d
postgres:9.5.3
docker run
--name
portal-db-test
-p
65433:5432
-v
$(
pwd
)
/tests/meta-db/sql:/docker-entrypoint-initdb.d/
-e
POSTGRES_USER
=
portal
-d
postgres:9.5.3
docker run
--name
portal-db-test
-p
65433:5432
-v
$(
pwd
)
/tests/meta-db/sql:/docker-entrypoint-initdb.d/
-e
POSTGRES_USER
=
portal
-d
postgres:9.5.3
# Get gateway IP
# Get gateway IP
echo
"Searching gateway IP..."
GATEWAY_IP
=
$(
docker inspect science-db-test |
grep
\"
Gateway
\"
:
\ \"
|
sed
's/.*Gateway\":\ \"\([^-]*\)\",/\1/'
|
head
-n
1
)
GATEWAY_IP
=
$(
docker inspect science-db-test |
grep
\"
Gateway
\"
:
\ \"
|
sed
's/.*Gateway\":\ \"\([^-]*\)\",/\1/'
|
head
-n
1
)
echo
"Gateway IP:
$GATEWAY_IP
"
echo
"Gateway IP:
$GATEWAY_IP
"
...
@@ -58,6 +62,7 @@ echo ""
...
@@ -58,6 +62,7 @@ echo ""
# Run backend container
# Run backend container
echo
"Running backend container..."
docker run
--name
backend-test
-p
65434:8080
\
docker run
--name
backend-test
-p
65434:8080
\
-e
"PORTAL_DB_URL=jdbc:postgresql://
$GATEWAY_IP
:65433/portal"
\
-e
"PORTAL_DB_URL=jdbc:postgresql://
$GATEWAY_IP
:65433/portal"
\
-e
"PORTAL_DB_SERVER=
$GATEWAY_IP
:65433/portal"
\
-e
"PORTAL_DB_SERVER=
$GATEWAY_IP
:65433/portal"
\
...
@@ -80,3 +85,6 @@ until [ $(docker logs backend-test | grep "Started MIPApplication" | wc -l) -eq
...
@@ -80,3 +85,6 @@ until [ $(docker logs backend-test | grep "Started MIPApplication" | wc -l) -eq
printf
'.'
printf
'.'
sleep
1
sleep
1
done
done
echo
"DONE"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
tests/science-db/sql/values.csv
+
2000
−
5
View file @
844a9d00
This diff is collapsed.
Click to expand it.
Preview
0%
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