Re: RE-SQL tests patch for packages node

navnath gadakh <[email protected]>
Newsgroups gmane.comp.db.postgresql.pgadmin.devel
Message-ID <CAOAJCYpski3tUyjURuXO0DDk5fOndaBGOPGCenw59GRWA=bzOw@mail.gmail.com>
Hi Dave,
         Please find the patch for M-SQL test cases for *Packages* module.

Thanks!

On Fri, Jul 12, 2019 at 4:02 PM Dave Page <[email protected]>
wrote:

> Thanks, applied.
>
> On Fri, Jul 12, 2019 at 11:24 AM navnath gadakh <
> [email protected]> wrote:
>
>> Hi Dave,
>>
>>      Please find the modified patch for packages as test cases were
>> failing on some servers.
>> Thanks!
>>
>>
>> On Thu, Jul 11, 2019 at 1:53 PM Dave Page <[email protected]>
>> wrote:
>>
>>> Thanks, applied.
>>>
>>> On Thu, Jul 11, 2019 at 8:07 AM Akshay Joshi <
>>> [email protected]> wrote:
>>>
>>>> Hi Navnath
>>>>
>>>> I have tested the patch and it is not working for EPAS 9.4, 9.5 and
>>>> 9.6. Attached is the modified patch which fix the issue.
>>>> Please work on child node (functions, procedure and variables) of
>>>> Packages on top of modified patch.
>>>>
>>>> On Wed, Jul 10, 2019 at 8:25 PM navnath gadakh <
>>>> [email protected]> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>>     I have attached the patch for RE-SQL test cases for *Packages*
>>>>> node.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> --
>>>>> *Regards,*
>>>>> *Navnath Gadakh*
>>>>>
>>>>
>>>>
>>>> --
>>>> *Thanks & Regards*
>>>> *Akshay Joshi*
>>>>
>>>> *Sr. Software Architect*
>>>> *EnterpriseDB Software India Private Limited*
>>>> *Mobile: +91 976-788-8246*
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> VP, Chief Architect, Tools & Installers
>>> EnterpriseDB: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>
>>
>> --
>> *Regards,*
>> *Navnath Gadakh*
>>
>
>
> --
> Dave Page
> VP, Chief Architect, Tools & Installers
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>


-- 
*Regards,*
*Navnath Gadakh*
msql_tests_packages_v1.patch (application/octet-stream, 8.1 KB)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/alter_package_headers_and_comment_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/alter_package_headers_and_comment_msql.sql
new file mode 100644
index 00000000..968a3e06
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/alter_package_headers_and_comment_msql.sql
@@ -0,0 +1,18 @@
+DROP PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func2(v2 integer) RETURN integer;
+PROCEDURE proc2(v2 integer);
+gl_v character varying(50);
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+
+CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func2(v2 integer) RETURN integer IS BEGIN RETURN V2+10; END FUNC2;
+PROCEDURE proc2(v2 integer) IS BEGIN DBMS_OUTPUT.put_line(v2+50); END;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+COMMENT ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+    IS 'test comment updated';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/create_package_with_all_options_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/create_package_with_all_options_msql.sql
new file mode 100644
index 00000000..cd21c113
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/create_package_with_all_options_msql.sql
@@ -0,0 +1,17 @@
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer;
+PROCEDURE proc1(v1 integer);
+gl_v character varying(50);
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END FUNC1;
+PROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+GRANT EXECUTE ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#" TO aq_administrator_role WITH GRANT OPTION;
+
+COMMENT ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+    IS 'test comment';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json
index cbf8e503..1bb5c470 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/10_plus/test.json
@@ -5,6 +5,7 @@
       "name": "Create Packages",
       "endpoint": "NODE-package.obj",
       "sql_endpoint": "NODE-package.sql_id",
+      "msql_endpoint": "NODE-package.msql",
       "data":
       {
         "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#",
@@ -23,13 +24,15 @@
         "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END FUNC1;\nPROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;",
         "schema": "public"
       },
-      "expected_sql_file": "create_package_with_all_options.sql"
+      "expected_sql_file": "create_package_with_all_options.sql",
+      "expected_msql_file": "create_package_with_all_options_msql.sql"
     },
     {
       "type": "alter",
       "name": "Alter Packages",
       "endpoint": "NODE-package.obj_id",
       "sql_endpoint": "NODE-package.sql_id",
+      "msql_endpoint": "NODE-package.msql_id",
       "data":
       {
         "description": "test comment updated",
@@ -38,7 +41,8 @@
         "pkgbodysrc": "FUNCTION func2(v2 integer) RETURN integer IS BEGIN RETURN V2+10; END FUNC2;\nPROCEDURE proc2(v2 integer) IS BEGIN DBMS_OUTPUT.put_line(v2+50); END;",
         "schema": "public"
       },
-      "expected_sql_file": "alter_package_headers_and_comment.sql"
+      "expected_sql_file": "alter_package_headers_and_comment.sql",
+      "expected_msql_file": "alter_package_headers_and_comment_msql.sql"
     }
   ]
 }
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment_msql.sql
new file mode 100644
index 00000000..1a0a896a
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment_msql.sql
@@ -0,0 +1,18 @@
+DROP PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func2(v2 integer) RETURN integer;
+PROCEDURE proc2(v2 integer);
+gl_v character varying(50);
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+
+CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func2(v2 integer) RETURN integer IS BEGIN RETURN V2+10; END;
+PROCEDURE proc2(v2 integer) IS BEGIN DBMS_OUTPUT.put_line(v2+50); END;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+COMMENT ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+    IS 'test comment updated';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options_msql.sql
new file mode 100644
index 00000000..af6649f5
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options_msql.sql
@@ -0,0 +1,17 @@
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer;
+PROCEDURE proc1(v1 integer);
+gl_v character varying(50);
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE BODY public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END;
+PROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+GRANT EXECUTE ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#" TO aq_administrator_role WITH GRANT OPTION;
+
+COMMENT ON PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+    IS 'test comment';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json
index 46a1a41a..c4afa3b5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json
@@ -5,6 +5,7 @@
       "name": "Create Packages",
       "endpoint": "NODE-package.obj",
       "sql_endpoint": "NODE-package.sql_id",
+      "msql_endpoint": "NODE-package.msql",
       "data":
       {
         "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#",
@@ -23,13 +24,15 @@
         "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10; END;\nPROCEDURE proc1(v1 integer) IS BEGIN DBMS_OUTPUT.put_line(v1+50); END;",
         "schema": "public"
       },
-      "expected_sql_file": "create_package_with_all_options.sql"
+      "expected_sql_file": "create_package_with_all_options.sql",
+      "expected_msql_file": "create_package_with_all_options_msql.sql"
     },
     {
       "type": "alter",
       "name": "Alter Packages",
       "endpoint": "NODE-package.obj_id",
       "sql_endpoint": "NODE-package.sql_id",
+      "msql_endpoint": "NODE-package.msql_id",
       "data":
       {
         "description": "test comment updated",
@@ -38,7 +41,8 @@
         "pkgbodysrc": "FUNCTION func2(v2 integer) RETURN integer IS BEGIN RETURN V2+10; END;\nPROCEDURE proc2(v2 integer) IS BEGIN DBMS_OUTPUT.put_line(v2+50); END;",
         "schema": "public"
       },
-      "expected_sql_file": "alter_package_headers_and_comment.sql"
+      "expected_sql_file": "alter_package_headers_and_comment.sql",
+      "expected_msql_file": "alter_package_headers_and_comment_msql.sql"
     }
   ]
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.