Commit 1a5a4c0c authored by Dariusz Kędzierski's avatar Dariusz Kędzierski

Initiall implementation of tavern tests

- Initial implementation of tests with tavern freamework
- All tests are green atm because only thing that is checked is
  response_conde
- More works on tests in next commits
parent 7832473c
---
name: Common test values
description: Common values for tests
variables:
service:
proto: http
server: 127.0.0.1
port: 8080
---
test_name: Hivemind bridge_api.get_post_header smoke test
includes:
- !include common.yaml
stages:
- name: get_post_header
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_post_header"
params: {"author":"steemit", "permlink":"firstpost"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.get_discussion smoke test
includes:
- !include common.yaml
stages:
- name: get_discussion
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_discussion"
params: {"author":"steemit", "permlink":"firstpost"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.get_post smoke test
includes:
- !include common.yaml
stages:
- name: get_post
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_post"
params: {"author":"steemit", "permlink":"firstpost"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.get_account_posts smoke test
includes:
- !include common.yaml
stages:
- name: get_account_posts
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_account_posts"
params: {"sort":"posts", "account":"steemit"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.get_ranked_posts smoke test
includes:
- !include common.yaml
stages:
- name: get_ranked_posts
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_ranked_posts"
params: {"sort":"trending","tag":"","observer":"steemit"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.get_profile smoke test
includes:
- !include common.yaml
stages:
- name: get_profile
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_profile"
params: {"account":"steemit"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.get_trending_topics smoke test
includes:
- !include common.yaml
stages:
- name: get_trending_topics
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_trending_topics"
params: {}
response:
status_code: 200
---
test_name: Hivemind bridge_api.post_notifications smoke test
includes:
- !include common.yaml
stages:
- name: post_notifications
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.post_notifications"
params: {"author":"steemit", "permlink":"firstpost"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.account_notifications smoke test
includes:
- !include common.yaml
stages:
- name: account_notifications
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.account_notifications"
params: {"account":"steemit","limit":100}
response:
status_code: 200
---
test_name: Hivemind bridge_api.unread_notifications smoke test
includes:
- !include common.yaml
stages:
- name: unread_notifications
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.unread_notifications"
params: {"account":"steemit"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.get_payout_stats smoke test
includes:
- !include common.yaml
stages:
- name: get_payout_stats
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_payout_stats"
params: {}
response:
status_code: 200
---
test_name: Hivemind bridge_api.get_community smoke test
includes:
- !include common.yaml
stages:
- name: get_community
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_community"
params: {"name":"hive-123456", "account":"steemit"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.list_communities smoke test
includes:
- !include common.yaml
stages:
- name: list_communities
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.list_communities"
params: {"limit":1}
response:
status_code: 200
---
test_name: Hivemind bridge_api.list_community_roles smoke test
includes:
- !include common.yaml
stages:
- name: list_community_roles
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.list_community_roles"
params: {"community":"hive-123456"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.list_subscribers smoke test
includes:
- !include common.yaml
stages:
- name: list_subscribers
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.list_subscribers"
params: {"community":"hive-123456"}
response:
status_code: 200
---
test_name: Hivemind bridge_api.list_all_subscriptions smoke test
includes:
- !include common.yaml
stages:
- name: list_all_subscriptions
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.list_all_subscriptions"
params: {"account":"steemit"}
response:
status_code: 200
\ No newline at end of file
---
test_name: Hivemind condenser_api.get_followers smoke test
includes:
- !include common.yaml
stages:
- name: get_followers
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_followers"
params: ["steemit",null,"blog",10]
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_following smoke test
includes:
- !include common.yaml
stages:
- name: get_following
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_following"
params: ["steemit",null,"blog",10]
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_follow_count smoke test
includes:
- !include common.yaml
stages:
- name: get_follow_count
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_follow_count"
params: ["steemit"]
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_content smoke test
includes:
- !include common.yaml
stages:
- name: get_content
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_content"
params: ["gtg", "hello-world"]
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_state smoke test
includes:
- !include common.yaml
stages:
- name: get_state
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_state"
params: ["/@steemit"]
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_trending_tags smoke test
includes:
- !include common.yaml
stages:
- name: get_trending_tags
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_trending_tags"
params: {"start_tag":"polska","limit":10}
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_discussions_by_trending smoke test
includes:
- !include common.yaml
stages:
- name: get_discussions_by_trending
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_discussions_by_trending"
params: {"tag":"polska","limit":1}
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_discussions_by_hot smoke test
includes:
- !include common.yaml
stages:
- name: get_discussions_by_hot
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_discussions_by_hot"
params: {"tag":"polska","limit":1}
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_discussions_by_promoted smoke test
includes:
- !include common.yaml
stages:
- name: get_discussions_by_promoted
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_discussions_by_promoted"
params: {"tag":"polska","limit":1}
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_discussions_by_created smoke test
includes:
- !include common.yaml
stages:
- name: get_discussions_by_created
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_discussions_by_created"
params: {"tag":"polska","limit":1}
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_discussions_by_blog smoke test
includes:
- !include common.yaml
stages:
- name: get_discussions_by_blog
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_discussions_by_blog"
params: {"tag":"blocktrades","limit":1}
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_discussions_by_feed smoke test
includes:
- !include common.yaml
stages:
- name: get_discussions_by_feed
request:
url: "{service.proto:s}://{service.server:s}:{service.port:d}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "condenser_api.get_discussions_by_feed"
params: {"tag":"blocktrades","limit":1}
response:
status_code: 200
---
test_name: Hivemind condenser_api.get_discussions_by_comments smoke test
includes:
- !include common.yaml
stages:
- name: get_discussions_by_comments
request: