diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-07-18 21:44:41 +0200 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-07-18 21:45:12 +0200 |
commit | b30da61d595a4efe4b35e5b05ca7fcd04732a28f (patch) | |
tree | d26a0d13f8ef8fcf9186895dbce7ca1accbec2be /autotest.sh | |
parent | 20a174e71b8e0f2a500d98e7781fe7f66e2e9a23 (diff) | |
download | nextcloud-server-b30da61d595a4efe4b35e5b05ca7fcd04732a28f.tar.gz nextcloud-server-b30da61d595a4efe4b35e5b05ca7fcd04732a28f.zip |
postgres added to autotest mechanism
Diffstat (limited to 'autotest.sh')
-rwxr-xr-x | autotest.sh | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/autotest.sh b/autotest.sh index bf98932a4af..a42c6ab059e 100755 --- a/autotest.sh +++ b/autotest.sh @@ -38,12 +38,26 @@ cat > ./tests/autoconfig-mysql.php <<DELIM ); DELIM +cat > ./tests/autoconfig-pgsql.php <<DELIM +<?php +\$AUTOCONFIG = array ( + 'installed' => false, + 'dbtype' => 'pgsql', + 'dbtableprefix' => 'oc_', + 'adminlogin' => 'admin', + 'adminpass' => 'admin', + 'directory' => '$BASEDIR/$DATADIR', + 'dbuser' => 'oc_autotest', + 'dbname' => 'oc_autotest', + 'dbhost' => 'localhost', + 'dbpass' => 'owncloud', +); +DELIM function execute_tests { echo "Setup environment for $1 testing ..." # back to root folder cd $BASEDIR - echo $BASEDIR # revert changes to tests/data git checkout tests/data/* @@ -59,6 +73,9 @@ function execute_tests { if [ "$1" == "mysql" ] ; then mysql -u oc_autotest -powncloud -e "DROP DATABASE oc_autotest" fi + if [ "$1" == "pgsql" ] ; then + dropdb -U oc_autotest oc_autotest + fi # copy autoconfig cp $BASEDIR/tests/autoconfig-$1.php $BASEDIR/config/autoconfig.php @@ -77,13 +94,17 @@ function execute_tests { # execute_tests "sqlite" execute_tests 'mysql' - -# TODO: implement this -#execute_tests 'postgresql' +execute_tests 'pgsql' # -# NOTES: +# NOTES on mysql: # - CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'owncloud'; # - grant access permissions: grant all on oc_autotest.* to 'oc_autotest'@'localhost'; # +# NOTES on pgsql: +# - su - postgres +# - createuser -P (enter username and password and enable superuser) +# - to enable dropdb I decided to add following line to pg_hba.conf (this is not the safest way but I don't care for the testing machine): +# local all all trust +# |