mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-01-24 23:36:48 -06:00
1. Resolved the issues related to the database connection.
2. Updated the create "pldbgapi" extension for the debugger. refs #5343
This commit is contained in:
parent
98ce8a298a
commit
9450065850
@ -467,7 +467,7 @@
|
||||
"url": "debugger/start_listener/",
|
||||
"is_positive_test": true,
|
||||
"mocking_required": false,
|
||||
"type": "direct",
|
||||
"type": "indirect",
|
||||
"invalid_name": false,
|
||||
"add_extension": true,
|
||||
"init_target": true,
|
||||
|
@ -35,8 +35,8 @@ class DebuggerStartListener(BaseTestGenerator):
|
||||
|
||||
local_self = funcs_utils.set_up(self)
|
||||
|
||||
if self.server['type'] == 'pg':
|
||||
self.skipTest('Skipping test case for pg')
|
||||
# if self.server['type'] == 'pg':
|
||||
# self.skipTest('Skipping test case for pg')
|
||||
|
||||
self.test_data['funcowner'] = self.server["username"]
|
||||
|
||||
|
@ -59,10 +59,20 @@ def add_extension(self, utils):
|
||||
"version": "1.1"
|
||||
}
|
||||
try:
|
||||
response = self.tester.post(
|
||||
extension_url,
|
||||
data=json.dumps(extension_data),
|
||||
content_type='application/json')
|
||||
connection = utils.get_db_connection(self.db_name,
|
||||
self.server['username'],
|
||||
self.server['db_password'],
|
||||
self.server['host'],
|
||||
self.server['port'],
|
||||
self.server['sslmode'])
|
||||
pg_cursor = connection.cursor()
|
||||
# Create pldbgapi extension if not exist.
|
||||
pg_cursor.execute('''CREATE EXTENSION IF NOT EXISTS
|
||||
"%s" WITH SCHEMA "%s" VERSION
|
||||
"%s" ''' % ('pldbgapi', self.schema_name, '1.1')
|
||||
)
|
||||
|
||||
connection.commit()
|
||||
except Exception as e:
|
||||
print('Unable to create "pldbgapi" extension.')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user