Fix tests for PostgreSQL >= 15

This commit is contained in:
Ales Nezbeda 2024-05-29 11:33:05 +02:00
commit 0a2c6cc346
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,6 @@
GRANT ALL ON DATABASE postgres TO johndoe;
GRANT ALL ON SCHEMA public to johndoe;
\c fOo
GRANT ALL ON SCHEMA public TO johndoe;

View file

@ -69,6 +69,7 @@ rlJournalStart
rlRun "postgresqlUDB $dbName $userName bar" 0 "Create DB $dbName and user $userName"
rlRun "postgresqlQuery \"\\\l\" | grep -q $dbName" 0 "Database $dbName exist";
rlRun "postgresqlQuery \"\\\du\" | grep -q \"$userName\"" 0 "User $userName exist";
rlRun "postgresqlExec 'psql -f ./grant.sql' postgres";
rlRun "psql -h localhost -U johndoe -d \"$dbName\" -c \"CREATE TABLE $tableName (id bigserial primary key,fakedata varchar(20),toDelete boolean);\"" 0 "Create table $tableName";
rlRun "postgresqlQuery \"\\\d\" \"$dbName\" | cut -d '|' -f 2 | tr -d '[:blank:]' | grep -qE \"^${tableName}$\"" 0 "Table $tableName exist";
rlPhaseEnd