test_condenser_api_patterns.tavern.yaml 20.5 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
---
  test_name: Hivemind condenser_api.get_discussions_by_comments patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_discussions_by_comments
      request:
13
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "condenser_api.get_discussions_by_comments"
          params: {"start_author":"admin","start_permlink":"firstpost","limit":1}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_discussions_by_comments"
            directory: "condenser_api_patterns"

Pawel Maniora's avatar
Pawel Maniora committed
30
31
32
33
34
---
  test_name: Hivemind condenser_api.get_discussions_by_comments unexpected keyword patterns test

  marks:
    - patterntest
35
    - failing
Andrzej Lisak's avatar
[ABW]:    
Andrzej Lisak committed
36
    - xfail # while this would be acceptable we should change it to invalid parameters over server error (code suggests we wanted to completely silence that, but rest passes is as generic error, old code was the same so...)
Pawel Maniora's avatar
Pawel Maniora committed
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

  includes:
    - !include common.yaml

  stages:
    - name: get_replies_by_last_update unexpected keyword 
      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_comments"
          params: [{"author": "steemit"}]
      response:
        status_code: 200
        verify_response_with:
56
          function: validate_response:compare_response_with_pattern
Pawel Maniora's avatar
Pawel Maniora committed
57
          extra_kwargs:
58
59
60
            method: "get_discussions_by_comments_unexpected_keyword"
            directory: "condenser_api_patterns"
            error_response: true
Pawel Maniora's avatar
Pawel Maniora committed
61

62
63
64
65
66
67
68
69
70
71
72
73
---
  test_name: Hivemind condenser_api.get_replies_by_last_update patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_replies_by_last_update
      request:
74
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "condenser_api.get_replies_by_last_update"
          params: ["admin","firstpost",1]
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_replies_by_last_update"
            directory: "condenser_api_patterns"
90

Pawel Maniora's avatar
Pawel Maniora committed
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
  test_name: Hivemind condenser_api.get_replies_by_last_update limit 100 patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_replies_by_last_update
      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_replies_by_last_update"
          params: ["gtg","",100]
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_replies_by_last_update_limit_100"
            directory: "condenser_api_patterns"
119

Pawel Maniora's avatar
Pawel Maniora committed
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---
  test_name: Hivemind condenser_api.get_replies_by_last_update no results patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_replies_by_last_update no results
      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_replies_by_last_update"
          params: ["admin","non_existing_permlink",1]
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_replies_by_last_update_no_results"
            directory: "condenser_api_patterns"
148

Pawel Maniora's avatar
Pawel Maniora committed
149
---
150
  test_name: Hivemind condenser_api.get_replies_by_last_update over limit patterns test
Pawel Maniora's avatar
Pawel Maniora committed
151
152
153
154
155
156
157
158

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
159
    - name: get_replies_by_last_update over limit
Pawel Maniora's avatar
Pawel Maniora committed
160
161
162
163
164
165
166
167
168
169
170
171
172
      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_replies_by_last_update"
          params: ["admin","non_existing_permlink",101]
      response:
        status_code: 200
        verify_response_with:
173
          function: validate_response:compare_response_with_pattern
Pawel Maniora's avatar
Pawel Maniora committed
174
          extra_kwargs:
175
176
177
            method: "get_replies_by_last_update_over_limit"
            directory: "condenser_api_patterns"
            error_response: true
178

Pawel Maniora's avatar
Pawel Maniora committed
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
---
  test_name: Hivemind condenser_api.get_replies_by_last_update blank start author patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_replies_by_last_update blank start author
      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_replies_by_last_update"
          params: ["","non_existing_permlink",1]
      response:
        status_code: 200
        verify_response_with:
203
          function: validate_response:compare_response_with_pattern
Pawel Maniora's avatar
Pawel Maniora committed
204
          extra_kwargs:
205
206
207
            method: "get_replies_by_last_update_blank_start_author"
            directory: "condenser_api_patterns"
            error_response: true
208

Pawel Maniora's avatar
Pawel Maniora committed
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
---
  test_name: Hivemind condenser_api.get_replies_by_last_update invalid account name length patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_replies_by_last_update invalid account name length
      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_replies_by_last_update"
          params: ["a","non_existing_permlink",1]
      response:
        status_code: 200
        verify_response_with:
233
          function: validate_response:compare_response_with_pattern
Pawel Maniora's avatar
Pawel Maniora committed
234
          extra_kwargs:
235
236
237
            method: "get_replies_by_last_update_invalid_account_name"
            directory: "condenser_api_patterns"
            error_response: true
Pawel Maniora's avatar
Pawel Maniora committed
238
            
239
240
241
242
243
244
245
246
247
248
249
250
---
  test_name: Hivemind condenser_api.get_discussions_by_author_before_date patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_discussions_by_author_before_date
      request:
251
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "condenser_api.get_discussions_by_author_before_date"
          params: {"author":"steemit","start_permlink":"firstpost","before_date":"2016-04-19T22:49:43","limit":1}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_discussions_by_author_before_date"
            directory: "condenser_api_patterns"
267

Pawel Maniora's avatar
Pawel Maniora committed
268
269
270
271
---
  test_name: Hivemind condenser_api.get_discussions_by_author_before_date patterns test

  marks:
272
    - patterntest # should return empty set - no posts before 2009 (to be investigated but works like original)
273

Pawel Maniora's avatar
Pawel Maniora committed
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
  includes:
    - !include common.yaml

  stages:
    - name: get_discussions_by_author_before_date_no_results
      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_author_before_date"
          params: {"author":"steemit","start_permlink":"firstpost","before_date":"2009-04-19T22:49:43","limit":1}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_discussions_by_author_before_date_no_results"
            directory: "condenser_api_patterns"
296

Pawel Maniora's avatar
Pawel Maniora committed
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
---
  test_name: Hivemind condenser_api.get_discussions_by_author_before_date over limit patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_discussions_by_author over limit
      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_author_before_date"
          params: {"author":"steemit","start_permlink":"firstpost","before_date":"2009-04-19T22:49:43","limit":101}
      response:
        status_code: 200
        verify_response_with:
321
          function: validate_response:compare_response_with_pattern
Pawel Maniora's avatar
Pawel Maniora committed
322
          extra_kwargs:
323
324
325
            method: "get_discussions_by_author_before_date_over_limit"
            directory: "condenser_api_patterns"
            error_response: true
326

327
328
329
330
331
332
333
334
335
336
337
338
---
  test_name: Hivemind condenser_api.get_post_discussions_by_payout patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_post_discussions_by_payout
      request:
339
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "condenser_api.get_post_discussions_by_payout"
          params: {"tag":"polska","limit":1}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_post_discussions_by_payout"
            directory: "condenser_api_patterns"
355

Pawel Maniora's avatar
Pawel Maniora committed
356
357
358
359
---
  test_name: Hivemind condenser_api.get_post_discussions_by_payout limit 20 test

  marks:
360
    - patterntest # differences in pending payout make it incomparable with original (also order of comments with the same payout was basically random)
361
    - failing
362
    - xfail # extra vote comes from the lack of muting functionality
Pawel Maniora's avatar
Pawel Maniora committed
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414

  includes:
    - !include common.yaml

  stages:
    - name: get_post_discussions_by_payout limit 20
      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_post_discussions_by_payout"
          params: {"tag":"test","limit":20}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_post_discussions_by_payout_limit_20"
            directory: "condenser_api_patterns"

---
  test_name: Hivemind condenser_api.get_post_discussions_by_payout no results test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_post_discussions_by_payout no results
      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_post_discussions_by_payout"
          params: {"tag":"non_existing_tag","limit":20}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_post_discussions_by_payout_no_results"
            directory: "condenser_api_patterns"
415

Pawel Maniora's avatar
Pawel Maniora committed
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
---
  test_name: Hivemind condenser_api.get_post_discussions_by_payout over limit test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_post_discussions_by_payout over limit
      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_post_discussions_by_payout"
          params: {"tag":"tag","limit":101}
      response:
        status_code: 200
        verify_response_with:
440
          function: validate_response:compare_response_with_pattern
Pawel Maniora's avatar
Pawel Maniora committed
441
          extra_kwargs:
442
443
444
            method: "get_post_discussions_by_payout_over_limit"
            directory: "condenser_api_patterns"
            error_response: true
Pawel Maniora's avatar
Pawel Maniora committed
445

446
447
448
449
450
451
452
453
454
455
456
457
---
  test_name: Hivemind condenser_api.get_comment_discussions_by_payout patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_comment_discussions_by_payout
      request:
458
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "condenser_api.get_comment_discussions_by_payout"
          params: {"tag":"polska","limit":1}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_comment_discussions_by_payout"
            directory: "condenser_api_patterns"
474

Pawel Maniora's avatar
Pawel Maniora committed
475
476
477
478
---
  test_name: Hivemind condenser_api.get_comment_discussions_by_payout limit 100 test

  marks:
479
    - patterntest # differences in pending payout make it incomparable with original (also order of comments with the same payout was basically random)
Pawel Maniora's avatar
Pawel Maniora committed
480
481
482

  includes:
    - !include common.yaml
483

Pawel Maniora's avatar
Pawel Maniora committed
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
  stages:
    - name: get_comment_discussions_by_payout limit 100
      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_comment_discussions_by_payout"
          params: {"tag":"test","limit":100}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_comment_discussions_by_payout_limit_100"
            directory: "condenser_api_patterns"
503

Pawel Maniora's avatar
Pawel Maniora committed
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
---
  test_name: Hivemind condenser_api.get_comment_discussions_by_payout no results test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_comment_discussions_by_payout no results
      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_comment_discussions_by_payout"
          params: {"tag":"non_existing_tag","limit":100}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_comment_discussions_by_payout_no_results"
            directory: "condenser_api_patterns"
Pawel Maniora's avatar
Pawel Maniora committed
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556

---
  test_name: Hivemind condenser_api.get_comment_discussions_by_payout over limit test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_comment_discussions_by_payout over limit
      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_comment_discussions_by_payout"
          params: {"tag":"tag","limit":101}
      response:
        status_code: 200
        verify_response_with:
557
          function: validate_response:compare_response_with_pattern
Pawel Maniora's avatar
Pawel Maniora committed
558
          extra_kwargs:
559
560
561
            method: "get_comment_discussions_by_payout_over_limit"
            directory: "condenser_api_patterns"
            error_response: true
Pawel Maniora's avatar
Pawel Maniora committed
562

563
564
565
566
567
568
569
570
571
572
573
574
---
  test_name: Hivemind condenser_api.get_blog_entries patterns test

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
    - name: get_blog_entries
      request:
575
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "condenser_api.get_blog_entries"
          params: {"account":"steemit","start_entry_id":0,"limit":1}
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_blog_entries"
            directory: "condenser_api_patterns"

---
Pawel Maniora's avatar
Pawel Maniora committed
593
  #should return reputation based on fat node, now is 0
594
595
596
  test_name: Hivemind condenser_api.get_account_reputations patterns test

  marks:
597
    - patterntest # fat node gives different answer (not only nonzero reputation but also json is generally different)
598
599
600
601
602
603
604

  includes:
    - !include common.yaml

  stages:
    - name: get_account_reputations
      request:
605
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "condenser_api.get_account_reputations"
          params: ["steemit", 1]
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_account_reputations"
            directory: "condenser_api_patterns"

---
  test_name: Hivemind condenser_api.get_reblogged_by patterns test

  marks:
626
627
628
    - patterntest
    - failing
    - xfail # reblogging does not work properly
629
630
631
632
633
634
635

  includes:
    - !include common.yaml

  stages:
    - name: get_reblogged_by
      request:
636
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
637
638
639
640
641
642
643
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
          method: "condenser_api.get_reblogged_by"
644
          params: {"author":"skypilot","permlink":"melting-rock"}
645
646
647
648
649
650
651
652
653
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
            method: "get_reblogged_by"
            directory: "condenser_api_patterns"

---
654
  test_name: Hivemind condenser_api.get_active_votes patterns test
655
656
657
658
659
660
661
662

  marks:
    - patterntest

  includes:
    - !include common.yaml

  stages:
663
    - name: get_active_votes
664
      request:
665
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
666
667
668
669
670
671
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
672
673
          method: "condenser_api.get_active_votes"
          params: ["biophil","test"]
674
675
676
677
678
      response:
        status_code: 200
        verify_response_with:
          function: validate_response:compare_response_with_pattern
          extra_kwargs:
679
            method: "get_active_votes"
680
            directory: "condenser_api_patterns"
681

682
---
683
  test_name: Hivemind deprecated condenser_api.get_account_votes 
684
685

  marks:
686
    - patterntest # we should probably change response to link to hive instead of steemit
687
688
689
690
691

  includes:
    - !include common.yaml

  stages:
692
    - name: get_account_votes deprecated
693
      request:
694
        url: "{service.proto:s}://{service.server:s}:{service.port}/"
695
696
697
698
699
700
        method: POST
        headers:
          content-type: application/json
        json:
          jsonrpc: "2.0"
          id: 1
701
702
          method: "condenser_api.get_account_votes"
          params: ["steemit"]
703
704
705
      response:
        status_code: 200
        verify_response_with:
706
          function: validate_response:compare_response_with_pattern
707
          extra_kwargs:
708
709
710
            method: "get_account_votes_deprecated"
            directory: "condenser_api_patterns"
            error_response: true