Fix tests for PostgreSQL >= 15
This commit is contained in:
parent
fd50b407c4
commit
0a2c6cc346
2 changed files with 7 additions and 0 deletions
6
Sanity/basic-functionality/grant.sql
Normal file
6
Sanity/basic-functionality/grant.sql
Normal 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;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue