public inbox for [email protected]
help / color / mirror / Atom feedFrom: navnath gadakh <[email protected]>
To: pgadmin-hackers <[email protected]>
To: Dave Page <[email protected]>
Subject: RE-SQL tests patch for packages node
Date: Wed, 10 Jul 2019 20:24:57 +0530
Message-ID: <CAOAJCYqQiGq55wth0Ptu9bVxvsRqs4xy3hMSmQ1zZZ3JvEGkSg@mail.gmail.com> (raw)
Hi Dave,
I have attached the patch for RE-SQL test cases for *Packages* node.
Thanks!
--
*Regards,*
*Navnath Gadakh*
Attachments:
[application/octet-stream] re_sql_packages_tests_v1.patch (3.5K, 3-re_sql_packages_tests_v1.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql
new file mode 100644
index 000000000..4a8f67231
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql
@@ -0,0 +1,12 @@
+-- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+
+-- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+PROCEDURE get_name(p_empno numeric);
+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.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options.sql
new file mode 100644
index 000000000..36982f95b
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/create_package_with_all_options.sql
@@ -0,0 +1,17 @@
+-- Package: public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+
+-- DROP PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+CREATE OR REPLACE PACKAGE public."pkg_emp_$%{}[]()&*^!@""'`\/#"
+IS
+FUNCTION func1(v1 integer) RETURN integer;
+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;
+END "pkg_emp_$%{}[]()&*^!@""'`\/#";
+
+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
new file mode 100644
index 000000000..64906b3bc
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/ppas/9.2_plus/test.json
@@ -0,0 +1,43 @@
+{
+ "scenarios": [
+ {
+ "type": "create",
+ "name": "Create Packages",
+ "endpoint": "NODE-package.obj",
+ "sql_endpoint": "NODE-package.sql_id",
+ "data":
+ {
+ "name": "pkg_emp_$%{}[]()&*^!@\"'`\\/#",
+ "description": "test comment",
+ "owner": "enterprisedb",
+ "pkgacl": [{
+ "grantee": "aq_administrator_role",
+ "grantor": "enterprisedb",
+ "privileges": [{
+ "privilege_type": "X",
+ "privilege": true,
+ "with_grant": true
+ }]
+ }],
+ "pkgbodysrc": "FUNCTION func1(v1 integer) RETURN integer IS BEGIN RETURN V1+10;END FUNC1;",
+ "pkgheadsrc": "FUNCTION func1(v1 integer) RETURN integer;",
+ "schema": "public"
+ },
+ "expected_sql_file": "create_package_with_all_options.sql"
+ },
+ {
+ "type": "alter",
+ "name": "Alter Packages",
+ "endpoint": "NODE-package.obj_id",
+ "sql_endpoint": "NODE-package.sql_id",
+ "data":
+ {
+ "description": "test comment updated",
+ "owner": "enterprisedb",
+ "pkgheadsrc": "PROCEDURE get_name(p_empno numeric);",
+ "schema": "public"
+ },
+ "expected_sql_file": "alter_package_headers_and_comment.sql"
+ }
+ ]
+}
view thread (11+ 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: RE-SQL tests patch for packages node
In-Reply-To: <CAOAJCYqQiGq55wth0Ptu9bVxvsRqs4xy3hMSmQ1zZZ3JvEGkSg@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