mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-29 13:07:50 +00:00
[#2950] fix pgsql 15 setup for unit tests
This commit is contained in:
parent
b0b270459e
commit
d9517e1712
10
hammer.py
10
hammer.py
@ -1498,6 +1498,16 @@ def _configure_pgsql(system, features, revision):
|
|||||||
cmd += 'EOF\n"'
|
cmd += 'EOF\n"'
|
||||||
execute(cmd, cwd='/tmp')
|
execute(cmd, cwd='/tmp')
|
||||||
|
|
||||||
|
if system == 'fedora' and int(revision) >= 38 or \
|
||||||
|
system == 'debian' and int(revision) >= 12 or \
|
||||||
|
system == 'alpine' and float(revision) >= 3.17:
|
||||||
|
#TODO it needs detection of pgsql version, and apply this only for postgres >= 15
|
||||||
|
cmd = """bash -c \"cat <<EOF | sudo -u postgres psql postgres
|
||||||
|
GRANT ALL ON DATABASE keatest TO keatest;
|
||||||
|
ALTER DATABASE keatest OWNER TO keatest;\n"""
|
||||||
|
cmd += 'EOF\n"'
|
||||||
|
execute(cmd, cwd='/tmp')
|
||||||
|
|
||||||
cmd = """bash -c \"cat <<EOF | sudo -u postgres psql -U keatest keatest
|
cmd = """bash -c \"cat <<EOF | sudo -u postgres psql -U keatest keatest
|
||||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO keatest_readonly;\n"""
|
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO keatest_readonly;\n"""
|
||||||
cmd += 'EOF\n"'
|
cmd += 'EOF\n"'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user