Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kasium committed Oct 30, 2023
1 parent f653ccd commit cd2845e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/ci_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ def setup(dburi: str) -> str:
cursor.execute(
f'CREATE USER {user} PASSWORD "{password}" NO FORCE_FIRST_PASSWORD_CHANGE'
)
for schema in ["TEST_SCHEMA", "TEST_SCHEMA2"]:
cursor.execute(f"SELECT 1 FROM SCHEMAS WHERE SCHEMA_NAME='{schema}'")
if cursor.fetchall():
cursor.execute(f"DROP SCHEMA {schema} CASCADE")
cursor.execute(f"CREATE SCHEMA {schema}")
cursor.execute(f"GRANT ALL PRIVILEGES ON SCHEMA {schema} TO {user}")
cursor.execute(f"GRANT CREATE SCHEMA TO {user}")

return f"hana://{user}:{password}@{url.hostname}:{url.port}"
Expand Down

0 comments on commit cd2845e

Please sign in to comment.