mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed RE-SQL test cases failed due to the previous commit.
Introduces a new key - replace_regex_pattern to synchronize the expected SQL with the backend SQL based on the regex string
This commit is contained in:
committed by
Akshay Joshi
parent
53a5410337
commit
28b637c99c
@@ -702,6 +702,12 @@ class ReverseEngineeredSQLTestCases(BaseTestGenerator):
|
||||
|
||||
sql = sql.replace(self.JSON_PLACEHOLDERS['password'], password)
|
||||
|
||||
if 'replace_regex_pattern' in scenario:
|
||||
for a_patten in scenario['replace_regex_pattern']:
|
||||
found = re.findall(a_patten, resp_sql)
|
||||
if len(found) > 0:
|
||||
sql = re.sub(a_patten, found[0], sql)
|
||||
|
||||
# Replace place holder <owner> with the current username
|
||||
# used to connect to the database
|
||||
if 'pga_job_id' in scenario:
|
||||
|
||||
Reference in New Issue
Block a user