public inbox for [email protected]  
help / color / mirror / Atom feed
patch for RE-SQL test cases for FTS Dictionaries.
2+ messages / 2 participants
[nested] [flat]

* patch for RE-SQL test cases for FTS Dictionaries.
@ 2019-07-11 10:48 Nagesh Dhope <[email protected]>
  2019-07-11 13:00 ` Re: patch for RE-SQL test cases for FTS Dictionaries. Dave Page <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Nagesh Dhope @ 2019-07-11 10:48 UTC (permalink / raw)
  To: pgadmin-hackers

Hi Hackers,

PFA, patch for RE-SQL test cases for FTS Dictionaries.

-- 
Thanks,
Nagesh


Attachments:

  [application/octet-stream] fts_dictionaries_resql_v1.patch (4.3K, 3-fts_dictionaries_resql_v1.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql
new file mode 100644
index 0000000..1ab7cce
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql
@@ -0,0 +1,10 @@
+-- Text Search Dictionary: public."Test Dictionary Edit#1"
+
+-- DROP TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1";
+
+CREATE TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1" (
+    TEMPLATE = simple
+);
+
+COMMENT ON TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1"
+    IS 'Test Description';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql
new file mode 100644
index 0000000..7a50ee8
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql
@@ -0,0 +1,11 @@
+-- Text Search Dictionary: public."Test Dictionary Edit#1"
+
+-- DROP TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1";
+
+CREATE TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1" (
+    TEMPLATE = simple,
+    stopwords = english
+);
+
+COMMENT ON TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1"
+    IS 'Test Description';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql
new file mode 100644
index 0000000..38aadc5
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql
@@ -0,0 +1,7 @@
+-- Text Search Dictionary: public."Dictionary1_$%{}[]()&*^!@""'`\/#"
+
+-- DROP TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#";
+
+CREATE TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#" (
+    TEMPLATE = simple
+);
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/tests.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/tests.json
new file mode 100644
index 0000000..5487b78
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/tests.json
@@ -0,0 +1,62 @@
+{
+  "scenarios": [
+    {
+      "type": "create",
+      "name": "Create FTS Dictionary",
+      "endpoint": "NODE-fts_dictionary.obj",
+      "sql_endpoint": "NODE-fts_dictionary.sql_id",
+      "data": {
+        "name": "Dictionary1_$%{}[]()&*^!@\"'`\\/#",
+        "template": "simple",
+        "options": [],
+        "schema": "public",
+        "schema_id": "<SCHEMA_ID>",
+        "owner": "postgres"
+      },
+      "expected_sql_file": "create_fts_dictionary.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter FTS Dictionary",
+      "endpoint": "NODE-fts_dictionary.obj_id",
+      "sql_endpoint": "NODE-fts_dictionary.sql_id",
+      "data": {
+        "name": "Test Dictionary Edit#1",
+        "description": "Test Description",
+        "options": {
+          "added": [
+            {
+              "value": "english",
+              "option": "stopwords"
+            }
+          ]
+        }
+      },
+      "expected_sql_file": "alter_fts_dictionary_options.sql"
+    },
+    {
+      "type": "alter",
+      "name": "Alter FTS Dictionary | Delete Options",
+      "endpoint": "NODE-fts_dictionary.obj_id",
+      "sql_endpoint": "NODE-fts_dictionary.sql_id",
+      "data": {
+        "options": {
+          "deleted": [
+            {
+              "value": "english",
+              "option": "stopwords"
+            }
+          ]
+        }
+      },
+      "expected_sql_file": "alter_fts_dictionary_delete_options.sql"
+    },
+    {
+      "type": "delete",
+      "name": "Drop FTS Dictionary",
+      "endpoint": "NODE-fts_dictionary.obj_id",
+      "sql_endpoint": "NODE-fts_dictionary.sql_id",
+      "data": {}
+    }
+  ]
+}


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: patch for RE-SQL test cases for FTS Dictionaries.
  2019-07-11 10:48 patch for RE-SQL test cases for FTS Dictionaries. Nagesh Dhope <[email protected]>
@ 2019-07-11 13:00 ` Dave Page <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Page @ 2019-07-11 13:00 UTC (permalink / raw)
  To: Nagesh Dhope <[email protected]>; +Cc: pgadmin-hackers

Thanks, commited.

On Thu, Jul 11, 2019 at 1:18 PM Nagesh Dhope <[email protected]>
wrote:

> Hi Hackers,
>
> PFA, patch for RE-SQL test cases for FTS Dictionaries.
>
> --
> Thanks,
> Nagesh
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2019-07-11 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 10:48 patch for RE-SQL test cases for FTS Dictionaries. Nagesh Dhope <[email protected]>
2019-07-11 13:00 ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox