mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Fix collation for postgres for unit tests (#7359)
When running the UTs against a postgres deatbase, we need to set the collation correctly.
This commit is contained in:
parent
38919b521e
commit
fb8ff79efd
1
changelog.d/7359.misc
Normal file
1
changelog.d/7359.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix collation for postgres for unit tests.
|
@ -74,7 +74,10 @@ def setupdb():
|
|||||||
db_conn.autocommit = True
|
db_conn.autocommit = True
|
||||||
cur = db_conn.cursor()
|
cur = db_conn.cursor()
|
||||||
cur.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
|
cur.execute("DROP DATABASE IF EXISTS %s;" % (POSTGRES_BASE_DB,))
|
||||||
cur.execute("CREATE DATABASE %s;" % (POSTGRES_BASE_DB,))
|
cur.execute(
|
||||||
|
"CREATE DATABASE %s ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' "
|
||||||
|
"template=template0;" % (POSTGRES_BASE_DB,)
|
||||||
|
)
|
||||||
cur.close()
|
cur.close()
|
||||||
db_conn.close()
|
db_conn.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user