Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
geosphere-mapserver
Manage
Activity
Members
Labels
Plan
Issues
6
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
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
cspp_geo
geosphere
geosphere-mapserver
Commits
0c46f8bf
Verified
Commit
0c46f8bf
authored
2 years ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Rearrange test script
parent
e77a2d5c
No related branches found
Branches containing commit
No related tags found
1 merge request
!5
Add initial attempt at S3 geotiff reading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ci/test_mapserver_image.sh
+50
-51
50 additions, 51 deletions
ci/test_mapserver_image.sh
with
50 additions
and
51 deletions
ci/test_mapserver_image.sh
+
50
−
51
View file @
0c46f8bf
...
...
@@ -54,6 +54,56 @@ graceful_exit() {
teardown_test
}
start_test_container
()
{
debug
"Starting test docker container (
${
image_url
}
:
${
image_tag
}
)..."
docker run
--rm
-d
--network
${
NETWORK_NAME
}
--name
test
-p
8888:80
$@
${
image_url
}
:
${
image_tag
}
start_status
=
$?
# just wait a bit to let the server start
sleep
2
debug
"Container started."
return
$start_status
}
start_shapefile_test_container
()
{
start_test_container
-v
"
$(
pwd
)
"
:
"/data"
}
start_pg_test_container
()
{
mkdir
pg_secrets
echo
"
${
POSTGRES_PASSWORD
}
"
>
pg_secrets/fake_file
start_test_container
-v
"
$(
pwd
)
"
:
"/data"
-e
POSTGRES_HOST
=
${
PG_SERVER_NAME
}
-e
POSTGRES_PORT
=
${
PG_PORT
}
-e
POSTGRES_PASSWORD_FILE
=
"/data/pg_secrets/fake_file"
}
# start_minio() {
# base_dir=$1
# docker run -d --rm --name ${MINIO_SERVER_NAME} --user ${UID}:${UID} -p ${S3_PORT}:9000 -p 9001:9001 -v ${base_dir}:/data minio/minio server /data --console-address ":9001"
# }
start_postgres
()
{
debug
"Starting Postgres database..."
docker run
--rm
-d
--network
${
NETWORK_NAME
}
--name
${
PG_SERVER_NAME
}
-e
POSTGRES_PASSWORD
=
"
${
POSTGRES_PASSWORD
}
"
postgis/postgis
debug
"Sleeping for 5 seconds for DB to start up..."
sleep
5
}
kill_test_container
()
{
debug
"Killing docker container..."
debug
"-----------------------------------------"
docker logs
test
debug
"-----------------------------------------"
docker
kill test
>
/dev/null
debug
"Done killing docker container."
}
kill_postgres
()
{
debug
"Killing postgres container..."
debug
"-----------------------------------------"
docker logs
${
PG_SERVER_NAME
}
debug
"-----------------------------------------"
docker
kill
${
PG_SERVER_NAME
}
>
/dev/null
debug
"Done killing postgres container."
}
add_shapefile_content
()
{
debug
"Creating fake shapefile directory for C01"
gtiff_location
=
$1
...
...
@@ -142,57 +192,6 @@ EOF
echo
${
gtiff_fn
}
return
$creation_status
}
start_test_container
()
{
debug
"Starting test docker container (
${
image_url
}
:
${
image_tag
}
)..."
docker run
--rm
-d
--network
${
NETWORK_NAME
}
--name
test
-p
8888:80
$@
${
image_url
}
:
${
image_tag
}
start_status
=
$?
# just wait a bit to let the server start
sleep
2
debug
"Container started."
return
$start_status
}
start_shapefile_test_container
()
{
start_test_container
-v
"
$(
pwd
)
"
:
"/data"
}
start_pg_test_container
()
{
mkdir
pg_secrets
echo
"
${
POSTGRES_PASSWORD
}
"
>
pg_secrets/fake_file
start_test_container
-v
"
$(
pwd
)
"
:
"/data"
-e
POSTGRES_HOST
=
${
PG_SERVER_NAME
}
-e
POSTGRES_PORT
=
${
PG_PORT
}
-e
POSTGRES_PASSWORD_FILE
=
"/data/pg_secrets/fake_file"
}
# start_minio() {
# base_dir=$1
# docker run -d --rm --name ${MINIO_SERVER_NAME} --user ${UID}:${UID} -p ${S3_PORT}:9000 -p 9001:9001 -v ${base_dir}:/data minio/minio server /data --console-address ":9001"
# }
start_postgres
()
{
debug
"Starting Postgres database..."
docker run
--rm
-d
--network
${
NETWORK_NAME
}
--name
${
PG_SERVER_NAME
}
-e
POSTGRES_PASSWORD
=
"
${
POSTGRES_PASSWORD
}
"
postgis/postgis
debug
"Sleeping for 5 seconds for DB to start up..."
sleep
5
}
kill_test_container
()
{
debug
"Killing docker container..."
debug
"-----------------------------------------"
docker logs
test
debug
"-----------------------------------------"
docker
kill test
>
/dev/null
debug
"Done killing docker container."
}
kill_postgres
()
{
debug
"Killing postgres container..."
debug
"-----------------------------------------"
docker logs
${
PG_SERVER_NAME
}
debug
"-----------------------------------------"
docker
kill
${
PG_SERVER_NAME
}
>
/dev/null
debug
"Done killing postgres container."
}
curl_index
()
{
debug
"Starting curl basic request..."
curl
--fail
-sS
--max-time
5
"http://localhost:8888/"
>
/dev/null
...
...
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