From 4bcef0eee5f7cd7d5f11ec05a976f51a8402d521 Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Fri, 31 Mar 2023 12:36:54 +0200 Subject: [PATCH] Do not log into the template1 database during test-setup Template databases are not designed to run random SQL code. They should only be accessed to modify the template itself. Use postgres instead. Change-Id: Id7d38895d8d04964557447ecbc6ca29f39f626c9 --- tools/test-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test-setup.sh b/tools/test-setup.sh index 16974adb52..924f0c8246 100755 --- a/tools/test-setup.sh +++ b/tools/test-setup.sh @@ -83,5 +83,5 @@ EOF chmod 0600 $HOME/.pgpass # Now create our database -psql -h 127.0.0.1 -U $DB_USER -d template1 -c "DROP DATABASE IF EXISTS openstack_citest" +psql -h 127.0.0.1 -U $DB_USER -d postgres -c "DROP DATABASE IF EXISTS openstack_citest" createdb -h 127.0.0.1 -U $DB_USER -l C -T template0 -E utf8 openstack_citest