From 320fc7fa15710524dfffcbd3e264b84005b31c66 Mon Sep 17 00:00:00 2001
From: Mariusz <mtrela@syncad.com>
Date: Fri, 6 Nov 2020 16:10:17 +0100
Subject: [PATCH] Added tests for `get_discussions_by_feed` group in order to
 use on full instance

---
 .../asgarth.tavern.yaml                       | 29 +++++++++++++++++++
 .../joetunex.tavern.yaml                      | 29 +++++++++++++++++++
 .../pfunk.tavern.yaml                         | 29 +++++++++++++++++++
 .../sketch.and.jam.tavern.yaml                | 29 +++++++++++++++++++
 4 files changed, 116 insertions(+)
 create mode 100644 hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/asgarth.tavern.yaml
 create mode 100644 hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/joetunex.tavern.yaml
 create mode 100644 hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/pfunk.tavern.yaml
 create mode 100644 hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/sketch.and.jam.tavern.yaml

diff --git a/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/asgarth.tavern.yaml b/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/asgarth.tavern.yaml
new file mode 100644
index 00000000..00ea516a
--- /dev/null
+++ b/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/asgarth.tavern.yaml
@@ -0,0 +1,29 @@
+---
+  test_name: Hivemind condenser_api.get_discussions_by_feed patterns test
+
+  marks:
+    - patterntest # tag is not a tag but account whose feed we are looking at (set of posts created/reblogged by those followed by selected account)
+                  # there can be no nonempty results for not-up-to-date HM because it only gives posts that were created/reblogged within last month (no param to change it)
+
+  includes:
+    - !include ../../common.yaml
+
+  stages:
+    - name: get_discussions_by_feed
+      request:
+        url: "{service.proto:s}://{service.server:s}:{service.port}/"
+        method: POST
+        headers:
+          content-type: application/json
+        json:
+          jsonrpc: "2.0"
+          id: 1
+          method: "condenser_api.get_discussions_by_feed"
+          params: {"tag":"asgarth","start_author":"","start_permlink":"","limit":20}
+      response:
+        status_code: 200
+        verify_response_with:
+          function: validate_response:compare_response_with_pattern
+          extra_kwargs:
+            method: "asgarth"
+            directory: "condenser_api_patterns/get_discussions_by_feed"
\ No newline at end of file
diff --git a/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/joetunex.tavern.yaml b/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/joetunex.tavern.yaml
new file mode 100644
index 00000000..7cc38910
--- /dev/null
+++ b/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/joetunex.tavern.yaml
@@ -0,0 +1,29 @@
+---
+  test_name: Hivemind condenser_api.get_discussions_by_feed patterns test
+
+  marks:
+    - patterntest # tag is not a tag but account whose feed we are looking at (set of posts created/reblogged by those followed by selected account)
+                  # there can be no nonempty results for not-up-to-date HM because it only gives posts that were created/reblogged within last month (no param to change it)
+
+  includes:
+    - !include ../../common.yaml
+
+  stages:
+    - name: get_discussions_by_feed
+      request:
+        url: "{service.proto:s}://{service.server:s}:{service.port}/"
+        method: POST
+        headers:
+          content-type: application/json
+        json:
+          jsonrpc: "2.0"
+          id: 1
+          method: "condenser_api.get_discussions_by_feed"
+          params: {"tag":"joetunex","start_author":"","start_permlink":"","limit":20}
+      response:
+        status_code: 200
+        verify_response_with:
+          function: validate_response:compare_response_with_pattern
+          extra_kwargs:
+            method: "joetunex"
+            directory: "condenser_api_patterns/get_discussions_by_feed"
\ No newline at end of file
diff --git a/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/pfunk.tavern.yaml b/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/pfunk.tavern.yaml
new file mode 100644
index 00000000..f2e10eba
--- /dev/null
+++ b/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/pfunk.tavern.yaml
@@ -0,0 +1,29 @@
+---
+  test_name: Hivemind condenser_api.get_discussions_by_feed patterns test
+
+  marks:
+    - patterntest # tag is not a tag but account whose feed we are looking at (set of posts created/reblogged by those followed by selected account)
+                  # there can be no nonempty results for not-up-to-date HM because it only gives posts that were created/reblogged within last month (no param to change it)
+
+  includes:
+    - !include ../../common.yaml
+
+  stages:
+    - name: get_discussions_by_feed
+      request:
+        url: "{service.proto:s}://{service.server:s}:{service.port}/"
+        method: POST
+        headers:
+          content-type: application/json
+        json:
+          jsonrpc: "2.0"
+          id: 1
+          method: "condenser_api.get_discussions_by_feed"
+          params: {"tag":"pfunk","start_author":"","start_permlink":"","limit":20}
+      response:
+        status_code: 200
+        verify_response_with:
+          function: validate_response:compare_response_with_pattern
+          extra_kwargs:
+            method: "pfunk"
+            directory: "condenser_api_patterns/get_discussions_by_feed"
\ No newline at end of file
diff --git a/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/sketch.and.jam.tavern.yaml b/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/sketch.and.jam.tavern.yaml
new file mode 100644
index 00000000..23940b96
--- /dev/null
+++ b/hivemind/tavern/condenser_api_patterns/get_discussions_by_feed/_tests_for_full_instance/sketch.and.jam.tavern.yaml
@@ -0,0 +1,29 @@
+---
+  test_name: Hivemind condenser_api.get_discussions_by_feed patterns test
+
+  marks:
+    - patterntest # tag is not a tag but account whose feed we are looking at (set of posts created/reblogged by those followed by selected account)
+                  # there can be no nonempty results for not-up-to-date HM because it only gives posts that were created/reblogged within last month (no param to change it)
+
+  includes:
+    - !include ../../common.yaml
+
+  stages:
+    - name: get_discussions_by_feed
+      request:
+        url: "{service.proto:s}://{service.server:s}:{service.port}/"
+        method: POST
+        headers:
+          content-type: application/json
+        json:
+          jsonrpc: "2.0"
+          id: 1
+          method: "condenser_api.get_discussions_by_feed"
+          params: {"tag":"sketch.and.jam","start_author":"","start_permlink":"","limit":20}
+      response:
+        status_code: 200
+        verify_response_with:
+          function: validate_response:compare_response_with_pattern
+          extra_kwargs:
+            method: "sketch.and.jam"
+            directory: "condenser_api_patterns/get_discussions_by_feed"
\ No newline at end of file
-- 
GitLab