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:
Nikhil Mohite 2020-12-07 15:44:56 +05:30 committed by Akshay Joshi
parent 98ce8a298a
commit 9450065850
3 changed files with 17 additions and 7 deletions

View File

@ -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,

View File

@ -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"]

View File

@ -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.')