summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2022-08-14 12:39:01 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2022-08-14 13:52:39 +0100
commit7adf6765592fa6b47c111d0ee247edb223494d69 (patch)
tree16614aaa0fcd02819d6b4ed0c1f35c3339cd01c7
parentb855ee2fb3776667c8b08aa6b80453d60e4fb509 (diff)
downloadexim4-7adf6765592fa6b47c111d0ee247edb223494d69.tar.gz
Testsuite: tweak pgsql testcase
-rwxr-xr-xtest/runtest2
-rw-r--r--test/scripts/2620-Postgresql/26208
-rw-r--r--test/stderr/26202
-rw-r--r--test/stdout/262025
4 files changed, 36 insertions, 1 deletions
diff --git a/test/runtest b/test/runtest
index f34e3c922..5b53668e6 100755
--- a/test/runtest
+++ b/test/runtest
@@ -1442,6 +1442,8 @@ RESET_AFTER_EXTRA_LINE_READ:
# Postgres version-dependent differences
s/^initdb: warning: (enabling "trust" authentication for local connections)$/\nWARNING: $1/;
+ # Postgre DB server PID
+ s/ \[\d+\] (?=(LOG: redirecting log|HINT: Future log output))/ [pppp] /;
# Not all builds include DMARC
next if /^DMARC: no (dmarc_tld_file|sender_host_address)$/ ;
diff --git a/test/scripts/2620-Postgresql/2620 b/test/scripts/2620-Postgresql/2620
index 5d160774d..149413af6 100644
--- a/test/scripts/2620-Postgresql/2620
+++ b/test/scripts/2620-Postgresql/2620
@@ -8,10 +8,15 @@ echo Starting DB server
perl
system 'DIR/bin.sys/initdb -D DIR/pgsql/data';
****
-sudo rm test-stdout
+#
+# I don not understand why, but the DB fails to start if this rm is present.
+#sudo rm test-stdout
+#
+# Start the DB server
background
DIR/bin.sys/postgres -D DIR/pgsql/data -p PORT_N -k DIR/pgsql
****
+#
sleep 1
echo Waiting for DB server
perl
@@ -28,6 +33,7 @@ system 'psql -h localhost -p PORT_N -d test \
INSERT INTO them VALUES ( CHR(39) || \'stquot\', \'quote1\' );" \
';
****
+#
echo Populated DB server
#
# now, the tests
diff --git a/test/stderr/2620 b/test/stderr/2620
index 24c8f77a0..9f68b79d7 100644
--- a/test/stderr/2620
+++ b/test/stderr/2620
@@ -804,3 +804,5 @@ close PGSQL connection: (TESTSUITE/pgsql/.s.PGSQL.1223)/test/CALLER
>>>>>>>>>>>>>>>> Exim pid=p1240 (fresh-exec) terminating with rc=0 >>>>>>>>>>>>>>>>
******** SERVER ********
+2017-07-30 18:51:05.712 BST [pppp] LOG: redirecting log output to logging collector process
+2017-07-30 18:51:05.712 BST [pppp] HINT: Future log output will appear in directory "log".
diff --git a/test/stdout/2620 b/test/stdout/2620
index f0c7fe6dd..13020359a 100644
--- a/test/stdout/2620
+++ b/test/stdout/2620
@@ -1,3 +1,28 @@
+The files belonging to this database system will be owned by user "CALLER".
+This user must also own the server process.
+
+The database cluster will be initialized with locale "C".
+The default database encoding has accordingly been set to "SQL_ASCII".
+The default text search configuration will be set to "english".
+
+Data page checksums are disabled.
+
+creating directory TESTSUITE/pgsql/data ... ok
+creating subdirectories ... ok
+selecting dynamic shared memory implementation ... posix
+selecting default max_connections ... 100
+selecting default shared_buffers ... 128MB
+selecting default time zone ... Europe/London
+creating configuration files ... ok
+running bootstrap script ... ok
+performing post-bootstrap initialization ... ok
+syncing data to disk ... ok
+
+
+Success. You can now start the database server using:
+
+ TESTSUITE/bin.sys/pg_ctl -D TESTSUITE/pgsql/data -l logfile start
+
pg_ctl: server is running (PID: p1234)
POSTGRES "-D" "TESTSUITE/pgsql/data" "-p" "1223" "-k" "TESTSUITE/pgsql"
INSERT 0 1