mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
Add script to create and initialize postgis test database
This commit is contained in:
parent
bc7036fd55
commit
cdf05acac8
@ -52,9 +52,15 @@ If this does not match your setup you can set the environment variable
|
||||
on standard libpq environment variables to tweak host, port user and
|
||||
password (PGHOST, PGPORT, PGUSER, PGPASSWORD).
|
||||
|
||||
Please note that the database needs to be initialized using the sql-script
|
||||
Please note that the database needs to be initialized using
|
||||
the sql-scripts:
|
||||
|
||||
tests/testdata/provider/testdata_pg*.sql
|
||||
|
||||
They take care of activating postgis for the test database and
|
||||
create some tables containing test data.
|
||||
|
||||
For convenience, a shell script is provided to create the database
|
||||
and initialize it as needed:
|
||||
|
||||
tests/testdata/provider/testdata_pg.sh
|
||||
|
12
tests/testdata/provider/testdata_pg.sh
vendored
Executable file
12
tests/testdata/provider/testdata_pg.sh
vendored
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
SCRIPTS="
|
||||
tests/testdata/provider/testdata_pg.sql
|
||||
tests/testdata/provider/testdata_pg_reltests.sql
|
||||
tests/testdata/provider/testdata_pg_vectorjoin.sql
|
||||
"
|
||||
|
||||
createdb qgis_test || exit 1
|
||||
for f in ${SCRIPTS}; do
|
||||
psql -f $f qgis_test --set ON_ERROR_STOP=1 || exit 1
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user