Don't create db accounts unencrypted
Recent postgres versions removed the support to store unencrypted
passwords so just remove that. Otherwise db tests fail with newer
postgres versions [1].
[1] Trace:
Traceback (most recent call last):
File "/home/zuul/src/git.openstack.org/openstack-infra/zuul/tests/base.py", line 2156, in setUp
self.setup_config()
File "/home/zuul/src/git.openstack.org/openstack-infra/zuul/tests/base.py", line 3230, in setup_config
self.useFixture(f)
File "/home/zuul/src/git.openstack.org/openstack-infra/zuul/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 756, in useFixture
reraise(*exc_info)
File "/home/zuul/src/git.openstack.org/openstack-infra/zuul/.tox/py36/lib/python3.6/site-packages/testtools/_compat3x.py", line 16, in reraise
raise exc_obj.with_traceback(exc_tb)
File "/home/zuul/src/git.openstack.org/openstack-infra/zuul/.tox/py36/lib/python3.6/site-packages/testtools/testcase.py", line 731, in useFixture
fixture.setUp()
File "/home/zuul/src/git.openstack.org/openstack-infra/zuul/tests/base.py", line 1947, in setUp
self.name, self.passwd))
psycopg2.NotSupportedError: UNENCRYPTED PASSWORD is no longer supported
LINE 1: create role efopzqqg_6361 with login unencrypted password 'c...
^
HINT: Remove UNENCRYPTED to store the password in encrypted form instead.
Change-Id: Ic305708161f9160844a0360025c9a9f70e229257
This commit is contained in:
+1
-1
@@ -1943,7 +1943,7 @@ class PostgresqlSchemaFixture(fixtures.Fixture):
|
||||
database="openstack_citest")
|
||||
db.autocommit = True
|
||||
cur = db.cursor()
|
||||
cur.execute("create role %s with login unencrypted password '%s';" % (
|
||||
cur.execute("create role %s with login password '%s';" % (
|
||||
self.name, self.passwd))
|
||||
cur.execute("create database %s OWNER %s TEMPLATE template0 "
|
||||
"ENCODING 'UTF8';" % (self.name, self.name))
|
||||
|
||||
Reference in New Issue
Block a user