public inbox for [email protected]
help / color / mirror / Atom feedFrom: Nikhil Mohite <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM-5343]: [Code Coverage] Improve API test cases for Debugger
Date: Mon, 7 Dec 2020 15:32:02 +0530
Message-ID: <CAOBg0APOhPo3+VFM4-LH5CZE=Yu5Y-Zmw8RhnfkVGQPkxLYPXA@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDeq+ZRmkOkW9rxss+vLe+3j3fTZ0VwmuQbdVh7o4Rds4Q@mail.gmail.com>
References: <CAOBg0AOQhDiS5VQjG6ErGp=tmNj=_4T9rkL6cJeAmnGuWWtCCA@mail.gmail.com>
<CANxoLDec48OnPneYTFdGHBzy_bDiPSWYtB8m0uh3SJEqpaSyOg@mail.gmail.com>
<CAOBg0AMfXZgZLDRr6Vqv7BXf1+VxJDDB1J_qWqjbxYaMQD2HFw@mail.gmail.com>
<CANxoLDeq+ZRmkOkW9rxss+vLe+3j3fTZ0VwmuQbdVh7o4Rds4Q@mail.gmail.com>
Hi Akshay/Team,
Please find the updated patch for debugger test cases.
1. Resolved the issues related to the database connection.
2. Updated the create "pldbgapi" extension for the debugger.
Regards,
Nikhil Mohite.
On Thu, Dec 3, 2020 at 10:47 AM Akshay Joshi <[email protected]>
wrote:
> Thanks, patch applied.
>
> On Wed, Dec 2, 2020 at 11:25 AM Nikhil Mohite <
> [email protected]> wrote:
>
>> Hi Akshay,
>>
>> please find the updated patch, sorry for the inconvenience.
>>
>>
>> Regards,
>> Nikhil Mohite.
>>
>> On Wed, Dec 2, 2020 at 11:03 AM Akshay Joshi <
>> [email protected]> wrote:
>>
>>> Hi Nikhil
>>>
>>> The patch is not applied, please rebase and send the patch again.
>>>
>>> On Tue, Dec 1, 2020 at 2:48 PM Nikhil Mohite <
>>> [email protected]> wrote:
>>>
>>>> Hi Team,
>>>>
>>>> Please find the attached patch for RM-5343
>>>> <https://redmine.postgresql.org/issues/5343;: [Code Coverage] Improve
>>>> API test cases for Debugger.
>>>> also updated implementation to remove dead code and unhandled
>>>> exceptions.
>>>>
>>>>
>>>> --
>>>> *Thanks & Regards,*
>>>> *Nikhil Mohite*
>>>> *Software Engineer.*
>>>> *EDB Postgres* <https://www.enterprisedb.com/;
>>>> *Mob.No: +91-7798364578.*
>>>>
>>>
>>>
>>> --
>>> *Thanks & Regards*
>>> *Akshay Joshi*
>>> *pgAdmin Hacker | Principal Software Architect*
>>> *EDB Postgres <http://edbpostgres.com>*
>>>
>>> *Mobile: +91 976-788-8246*
>>>
>>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Principal Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>
Attachments:
[application/octet-stream] RM_5343_V3.patch (2.5K, 3-RM_5343_V3.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/debugger/tests/debugger_test_data.json b/web/pgadmin/tools/debugger/tests/debugger_test_data.json
index bcd0613..c8991a5 100644
--- a/web/pgadmin/tools/debugger/tests/debugger_test_data.json
+++ b/web/pgadmin/tools/debugger/tests/debugger_test_data.json
@@ -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,
diff --git a/web/pgadmin/tools/debugger/tests/test_start_listener_debugger.py b/web/pgadmin/tools/debugger/tests/test_start_listener_debugger.py
index f4b079e..b99a888 100644
--- a/web/pgadmin/tools/debugger/tests/test_start_listener_debugger.py
+++ b/web/pgadmin/tools/debugger/tests/test_start_listener_debugger.py
@@ -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"]
diff --git a/web/pgadmin/tools/debugger/tests/utils.py b/web/pgadmin/tools/debugger/tests/utils.py
index 6f6082d..0d508c1 100644
--- a/web/pgadmin/tools/debugger/tests/utils.py
+++ b/web/pgadmin/tools/debugger/tests/utils.py
@@ -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.')
view thread (15+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [pgAdmin][RM-5343]: [Code Coverage] Improve API test cases for Debugger
In-Reply-To: <CAOBg0APOhPo3+VFM4-LH5CZE=Yu5Y-Zmw8RhnfkVGQPkxLYPXA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox