+++ /dev/null
-#!/bin/sh
-
-#
-# Test the database upgrades in gcm_daemon.
-# Create an old, version 1, database and run gcm_daemon to perform
-# an upgrade to the latest version.
-# Then, create a latest-version database and compare dumps of these
-# database. They should be essentially the same.
-
-cd ..
-
-if psql gnucomo_test <test/create_v1.sql -q >/dev/null
-then
- cd src/gcm_daemon; ./gcm_daemon.php -c gnucomo_test ; cd ../..
- pg_dump gnucomo_test |grep -v '^--' | sort >test/dump.upgraded.sql
- psql gnucomo_test -f src/database/destroy.sql -q
- psql gnucomo_test <src/database/create.sql -q >/dev/null
- pg_dump gnucomo_test |grep -v '^--' | sort >test/dump.latest.sql
- psql gnucomo_test -f src/database/destroy.sql -q
-
- # Expect 28 lines of diff output (character varying vs. text types)
- diff test/dump.latest.sql test/dump.upgraded.sql
-
- exit 0
-else
- echo Can not create test database
- exit 1
-fi