tests.yaml 28.1 KB
Newer Older
Stephane Bortzmeyer's avatar
Stephane Bortzmeyer committed
1
---
2
config:
3
  timeout: 4
Alexandre's avatar
Alexandre committed
4
5
6
7
8
  markers:
      - "dot: test specific to DoT"
      - "doh: test specific to DoH"
      - "monitoring: test using monitoring"
      - "exception: test raising an exception"
Alexandre's avatar
Alexandre committed
9
      - "streams: test multistreams with DoH"
10
      - "check: test related to the compliance option --check"
11
12
      - "forceIPv4: test using the option -4"
      - "forceIPv6: test using the option -6"
Alexandre's avatar
Alexandre committed
13
      - "pipelining: test with --pipelining option"
Alexandre's avatar
Alexandre committed
14
      - "trunc: test with --truncated-data"
15
      - "fail: mark test with a resolver currently failing our tests"
Alexandre's avatar
Alexandre committed
16
      - "slow: test that need time to run"
17

18
19
20
21
22
tests:
    - exe: './homer.py'
      args:
          - '-h'
      retcode: 0
Alexandre's avatar
Alexandre committed
23
      partstderr: 'url-or-servername [domain-name [DNS type]]'
24
      stdout: ''
Stephane Bortzmeyer's avatar
Stephane Bortzmeyer committed
25

26
27
28
29
    - exe: './homer.py'
      args:
          - '--zzz'
      retcode: 1
Alexandre's avatar
Alexandre committed
30
      partstderr: 'url-or-servername [domain-name [DNS type]]'
31
      stdout: ''
Stephane Bortzmeyer's avatar
Stephane Bortzmeyer committed
32

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
    - exe: './homer.py'
      args:
          - 'https://doh.bortzmeyer.fr/'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      args:
          - '--dot'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'
Stephane Bortzmeyer's avatar
Stephane Bortzmeyer committed
49

Alexandre's avatar
Alexandre committed
50
51
52
53
54
55
56
57
58
59
60
    - exe: './homer.py'
      markers:
          - 'exception'
      args:
          - '--dot'
          - 'https//doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'not a name or'
      stdout: ''

61
62
63
64
65
###############################################################################

    - exe: './homer.py'
      name: '--check of a correct DoH'
      markers:
66
67
          - 'doh'
          - 'check'
68
69
70
71
72
73
74
75
76
77
      args:
          - '--check'
          - 'https://doh.bortzmeyer.fr/'
          - 'ressources-pedagogiques.org'
      retcode: 0
      stdout: "OK\n"

    - exe: './homer.py'
      name: '--check of a broken DoH'
      markers:
78
79
          - 'doh'
          - 'check'
80
81
82
83
84
85
86
87
88
89
90
      args:
          - '--check'
          - 'https://www.bortzmeyer.org/'
          - 'ressources-pedagogiques.org'
      retcode: 1
      stderr: ''
      stdout: "KO\n"

    - exe: './homer.py'
      name: '--check of a DoH with HEAD unimplemented'
      markers:
91
92
          - 'doh'
          - 'check'
93
94
95
96
97
98
99
      args:
          - '--check'
          - '--mandatory-level'
          - 'nicetohave'
          - 'https://doh.42l.fr/dns-query'
          - 'ressources-pedagogiques.org'
      retcode: 1
Alexandre's avatar
Alexandre committed
100
      partstderr: "Test HEAD: HTTP error 405: [No details]\n"
101
102
103
104
105
      stdout: "KO\n"

    - exe: './homer.py'
      name: '--check of a correct DoT'
      markers:
106
107
          - 'dot'
          - 'check'
108
109
110
111
112
113
114
115
116
      args:
          - '--check'
          - '--dot'
          - 'dot.bortzmeyer.fr'
          - 'ressources-pedagogiques.org'
      retcode: 0
      stderr: ''
      stdout: "OK\n"

Alexandre's avatar
Alexandre committed
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
    - exe: './homer.py'
      name: "[doh][check] Successcul check"
      markers:
          - 'doh'
          - 'check'
      args:
          - '--check'
          - 'https://dns.google/dns-query'
          - 'framagit.org'
      stderr: ''
      stdout: "OK\n"

    - exe: './homer.py'
      name: "[doh][fail][check] 502 Bad Gateway"
      markers:
          - 'doh'
          - 'check'
          - 'fail'
Alexandre's avatar
Alexandre committed
135
          - 'slow'
Alexandre's avatar
Alexandre committed
136
      timeout: 12
Alexandre's avatar
Alexandre committed
137
138
139
140
141
142
143
      args:
          - '--check'
          - 'https://doh.42l.fr/dns-query'
          - 'framagit.org'
      partstderr: 'Test truncated data: HTTP error 502'
      stdout: "KO\n"

Alexandre's avatar
Alexandre committed
144
    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
145
      name: '[doh][check] Test that all the resolved IPs are tried, try a first IP'
Alexandre's avatar
Alexandre committed
146
      markers:
147
148
          - 'doh'
          - 'check'
Alexandre's avatar
Alexandre committed
149
      args:
Alexandre's avatar
Alexandre committed
150
          - '--debug'
Alexandre's avatar
Alexandre committed
151
152
          - '--check'
          - 'https://doh.bortzmeyer.fr'
153
          - 'www.afnic.fr'
Alexandre's avatar
Alexandre committed
154
155
156
      partstderr: "Connecting to hostname: 2001:41d0:302:2200::180"

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
157
      name: '[doh][check] Test that all the resolved IPs are tried, try another IP'
Alexandre's avatar
Alexandre committed
158
      markers:
159
160
          - 'doh'
          - 'check'
Alexandre's avatar
Alexandre committed
161
      args:
Alexandre's avatar
Alexandre committed
162
          - '--debug'
Alexandre's avatar
Alexandre committed
163
164
          - '--check'
          - 'https://doh.bortzmeyer.fr'
165
          - 'curl.haxx.se'
Alexandre's avatar
Alexandre committed
166
167
168
      partstderr: "Connecting to hostname: 193.70.85.11"

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
169
      name: '[dot][check] Test that all the resolved IPs are tried, try a first IP'
Alexandre's avatar
Alexandre committed
170
      markers:
171
172
          - 'dot'
          - 'check'
Alexandre's avatar
Alexandre committed
173
174
175
176
177
      args:
          - '-v'
          - '--check'
          - '--dot'
          - 'dot.bortzmeyer.fr'
178
179
          - 'www.afnic.fr'
      partstdout: "on 193.70.85.11 ...\nConnecting to ('193.70.85.11', 853) ..."
Alexandre's avatar
Alexandre committed
180
181

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
182
      name: '[doh][check] Test that all the resolved IPs are tried, try another IP'
Alexandre's avatar
Alexandre committed
183
      markers:
184
185
          - 'dot'
          - 'check'
Alexandre's avatar
Alexandre committed
186
187
188
189
190
      args:
          - '-v'
          - '--check'
          - '--dot'
          - 'dot.bortzmeyer.fr'
191
192
193
194
          - 'www.afnic.fr'
      partstdout: "on 2001:41d0:302:2200::180 ...\nConnecting to ('2001:41d0:302:2200::180', 853, 0, 0) ..."

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
195
      name: '[dot][check] Test all the IPs, force IPv4'
196
197
198
199
200
201
202
203
204
205
206
207
208
209
      markers:
          - 'dot'
          - 'check'
          - 'forceIPv4'
      args:
          - '-v'
          - '-4'
          - '--check'
          - '--dot'
          - 'dns.google'
          - 'framagit.org'
      partstdout: "on 8.8.8.8 ...\nConnecting to ('8.8.8.8', 853) ..."

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
210
      name: '[dot][check] Test all the IPs, force IPv4, check another IP'
211
212
213
214
215
216
217
218
219
220
221
222
223
224
      markers:
          - 'dot'
          - 'check'
          - 'forceIPv4'
      args:
          - '-v'
          - '-4'
          - '--check'
          - '--dot'
          - 'dns.google'
          - 'framagit.org'
      partstdout: "on 8.8.4.4 ...\nConnecting to ('8.8.4.4', 853) ..."

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
225
      name: '[dot][check] Test all the IPs, force IPv6'
226
227
228
229
230
231
232
233
234
235
236
237
238
239
      markers:
          - 'dot'
          - 'check'
          - 'forceIPv6'
      args:
          - '-v'
          - '-6'
          - '--check'
          - '--dot'
          - 'dns.google'
          - 'framagit.org'
      partstdout: "on 2001:4860:4860::8844 ...\nConnecting to ('2001:4860:4860::8844', 853, 0, 0) ..."

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
240
      name: '[dot][check] Test all the IPs, force IPv6, check another IP'
241
242
243
244
245
246
247
248
249
250
251
252
253
254
      markers:
          - 'dot'
          - 'check'
          - 'forceIPv6'
      args:
          - '-v'
          - '-6'
          - '--check'
          - '--dot'
          - 'dns.google'
          - 'framagit.org'
      partstdout: "on 2001:4860:4860::8888 ...\nConnecting to ('2001:4860:4860::8888', 853, 0, 0) ..."

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
255
      name: '[doh][check] Test all the IPs, force IPv4'
256
257
258
259
260
      markers:
          - 'doh'
          - 'check'
          - 'forceIPv4'
      args:
Alexandre's avatar
Alexandre committed
261
          - '--debug'
262
263
264
265
266
267
268
          - '-4'
          - '--check'
          - 'https://dns.google/dns-query'
          - 'www.afnic.fr'
      partstderr: "Connecting to hostname: 8.8.8.8"

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
269
      name: '[doh][check] Test all the IPs, force IPv4, check another IP'
270
271
272
273
274
      markers:
          - 'doh'
          - 'check'
          - 'forceIPv4'
      args:
Alexandre's avatar
Alexandre committed
275
          - '--debug'
276
277
278
279
280
281
282
          - '-4'
          - '--check'
          - 'https://dns.google/dns-query'
          - 'curl.haxx.se'
      partstderr: "Connecting to hostname: 8.8.4.4"

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
283
      name: '[doh][check] Test all the IPs, force IPv6'
284
285
286
287
288
      markers:
          - 'doh'
          - 'check'
          - 'forceIPv6'
      args:
Alexandre's avatar
Alexandre committed
289
          - '--debug'
290
291
292
293
294
295
296
          - '-6'
          - '--check'
          - 'https://dns.google/dns-query'
          - 'www.afnic.fr'
      partstderr: "Connecting to hostname: 2001:4860:4860::8888"

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
297
      name: '[doh][check] Test all the IPs, force IPv6, check another IP'
298
299
300
301
302
      markers:
          - 'doh'
          - 'check'
          - 'forceIPv6'
      args:
Alexandre's avatar
Alexandre committed
303
          - '--debug'
304
305
306
307
308
          - '-6'
          - '--check'
          - 'https://dns.google/dns-query'
          - 'curl.haxx.se'
      partstderr: "Connecting to hostname: 2001:4860:4860::8844"
Alexandre's avatar
Alexandre committed
309

Alexandre's avatar
Alexandre committed
310
311
312
313
314
315
    - exe: './homer.py'
      name: '[dot][check] Test all IPs on brok.sources.org'
      timeout: 6
      markers:
          - 'dot'
          - 'check'
Alexandre's avatar
Alexandre committed
316
          - 'slow'
Alexandre's avatar
Alexandre committed
317
318
319
320
321
322
      args:
          - '-k'
          - '--check'
          - '--dot'
          - 'brok.sources.org'
          - 'in'
323
324
325
326
327
328
329
330
      partstdout: 'Could not connect to'

    - exe: './homer.py'
      name: '[dot][check] Test all IPs on brok.sources.org, get a KO'
      timeout: 6
      markers:
          - 'dot'
          - 'check'
Alexandre's avatar
Alexandre committed
331
          - 'slow'
332
333
334
335
336
337
      args:
          - '-k'
          - '--check'
          - '--dot'
          - 'brok.sources.org'
          - 'in'
338
      partstdout: "KO\n"
Alexandre's avatar
Alexandre committed
339

340

341
342
343
344
###############################################################################

    - exe: './homer.py'
      name: '[doh] Force IPv4 and IPv6'
Alexandre's avatar
Alexandre committed
345
346
347
      markers:
          - 'doh'
          - 'exception'
348
349
          - 'forceIPv4'
          - 'forceIPv6'
350
351
352
353
354
355
356
357
358
359
360
      args:
          - '-4'
          - '-6'
          - 'https://doh.bortzmeyer.fr/'
          - 'framagit.org'
      retcode: 1
      partstderr: 'IPv4 *or* IPv6'
      stdout: ''

    - exe: './homer.py'
      name: '[dot] Force IPv4 and IPv6'
Alexandre's avatar
Alexandre committed
361
362
363
      markers:
          - 'dot'
          - 'exception'
364
365
          - 'forceIPv4'
          - 'forceIPv6'
366
367
368
369
370
371
372
373
374
375
376
377
      args:
          - '-4'
          - '-6'
          - '--dot'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'IPv4 *or* IPv6'
      stdout: ''

    - exe: './homer.py'
      name: '[dot] Use IPv4 address (raise certificate error)'
Alexandre's avatar
Alexandre committed
378
379
380
      markers:
          - 'dot'
          - 'exception'
381
382
383
384
385
386
387
388
389
390
      args:
          - '--dot'
          - '193.70.85.11'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Certificate error'
      stdout: ''

    - exe: './homer.py'
      name: '[dot] Use IPv4 address (without certificate check)'
Alexandre's avatar
Alexandre committed
391
392
      markers:
          - 'dot'
393
394
395
396
397
398
399
400
401
402
403
      args:
          - '--insecure'
          - '--dot'
          - '193.70.85.11'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      name: '[dot] Use IPv4 address and force IPv6 (without certificate check)'
Alexandre's avatar
Alexandre committed
404
405
406
      markers:
          - 'dot'
          - 'exception'
407
          - 'forceIPv6'
408
409
410
411
412
413
414
415
416
417
418
419
      args:
          - '-6'
          - '--insecure'
          - '--dot'
          - '193.70.85.11'
          - 'framagit.org'
      retcode: 1
      partstderr: 'litteral IPv4'
      stdout: ''

    - exe: './homer.py'
      name: '[dot] Use IPv6 address (raise certificate error)'
Alexandre's avatar
Alexandre committed
420
421
422
      markers:
          - 'dot'
          - 'exception'
423
424
425
426
427
428
429
430
431
432
      args:
          - '--dot'
          - '2001:620:0:ff::2'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Certificate error'
      stdout: ''

    - exe: './homer.py'
      name: '[dot] Use IPv6 address (without certificate check)'
Alexandre's avatar
Alexandre committed
433
434
      markers:
          - 'dot'
435
436
437
438
439
440
441
442
443
444
445
      args:
          - '--insecure'
          - '--dot'
          - '2001:620:0:ff::2'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      name: '[dot] Use IPv6 address and force IPv4 (without certificate check)'
Alexandre's avatar
Alexandre committed
446
447
448
      markers:
          - 'dot'
          - 'exception'
449
          - 'forceIPv4'
450
451
452
453
454
455
456
457
458
459
      args:
          - '-4'
          - '--insecure'
          - '--dot'
          - '2001:620:0:ff::2'
          - 'framagit.org'
      retcode: 1
      partstderr: 'litteral IPv6'
      stdout: ''

Alexandre's avatar
Alexandre committed
460
461
462
463
    - exe: './homer.py'
      name: '[dot] Loop on all ips on connection error (brok.sources.org)'
      markers:
          - 'dot'
Alexandre's avatar
Alexandre committed
464
          - 'slow'
Alexandre's avatar
Alexandre committed
465
466
467
468
469
470
471
472
473
474
475
476
477
478
      timeout: 6
      args:
          - '--dot'
          - '--insecure'
          - 'brok.sources.org'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      name: '[dot] Force IPv6 on brok.sources.org'
      markers:
          - 'dot'
479
          - 'forceIPv6'
Alexandre's avatar
Alexandre committed
480
          - 'slow'
Alexandre's avatar
Alexandre committed
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
      timeout: 6
      args:
          - '-6'
          - '--insecure'
          - '--dot'
          - 'brok.sources.org'
          - 'framagit.org'
      retcode: 1
      partstderr: 'not connect to'
      stdout: ''

    - exe: './homer.py'
      name: '[dot] Not a DoT server'
      markers:
          - 'dot'
      timeout: 5
      args:
          - '--dot'
          - 'afnic.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'not connect to'
      stdout: ''

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
532
    - exe: './homer.py'
      name: '[dot] Authenticates with the key (SPKI)'
      markers:
          - 'dot'
      timeout: 5
      args:
          - '--dot'
          - '--key'
          - '62lKu9HsDVbyiPenApnc4sfmSYTHOVfFgL3pyB+cBL4='
          - '145.100.185.15'
          - 'sinodun.com'
      retcode: 0
      stderr: ''

    - exe: './homer.py'
      name: '[dot] Authenticates with the WRONG key (SPKI)'
      markers:
          - 'dot'
      timeout: 5
      args:
          - '--dot'
          - '--key'
          - '62pKu9HsDVbyiPenApnc4sfmSYTHOVfFgL3pyB+cBL5='
          - '145.100.185.15'
          - 'sinodun.com'
      retcode: 1
      partstderr: 'Key error'

Alexandre's avatar
Alexandre committed
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575

################################################################################

    - exe: './homer.py'
      name: '[dot][pipelining] Pipelining only with dot'
      markers:
          - 'pipelining'
      args:
          - '--pipelining'
          - 'dot.bortzmeyer.fr'
      retcode: 1
      partstderr: 'Pipelining is only accepted for DoT'
      stdout: ''

    - exe: './homer.py'
      name: '[dot][pipelining] Pipelining only with input file'
      markers:
          - 'pipelining'
      args:
          - '--dot'
          - '--pipelining'
          - 'dot.bortzmeyer.fr'
      retcode: 1
      partstderr: 'Pipelining requires an input file'
      stdout: ''

    - exe: './homer.py'
      name: '[dot][pipelining] 5 requests from input file'
      markers:
          - 'dot'
          - 'pipelining'
      args:
          - '--dot'
          - '--pipelining'
          - '--file'
          - 'input_file'
          - '--repeat'
          - '5'
          - 'dot.bortzmeyer.fr'
      retcode: 0
      stderr: ''
      partstdout: "OK\n"

576
577
578

################################################################################

579
    - exe: './homer.py'
580
      name: '[dot][check] Resolver returning a malformed DNS message'
581
582
583
      markers:
          - 'dot'
          - 'check'
584
          - 'exception'
585
586
587
588
589
      args:
          - '--dot'
          - '--check'
          - 'dns.digitale-gesellschaft.ch'
          - 'framagit.org'
590
591
592
      retcode: 0
      stderr: ''
      stdout: "OK\n"
593

Alexandre's avatar
Alexandre committed
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
    - exe: './homer.py'
      name: '[dot][trunc] Resolver returning a malformed DNS message'
      markers:
          - 'dot'
          - 'trunc'
          - 'exception'
      args:
          - '--dot'
          - '--truncated-data'
          - 'dns.digitale-gesellschaft.ch'
          - 'wikipedia.org'
      retcode: 1
      partstderr: 'Error: Received DNS message is malformed'
      partstdout: "KO\n"

    - exe: './homer.py'
      name: '[doh][trunc] Resolver returning a malformed DNS message'
      markers:
          - 'trunc'
          - 'exception'
      args:
          - '--truncated-data'
          - 'https://dns.digitale-gesellschaft.ch/dns-query'
          - 'wikipedia.org'
      retcode: 1
      partstdout: "KO\n"

Alexandre's avatar
Alexandre committed
621
622
623
624
625
626
627
628
629
630
631
632
633
    - exe: './homer.py'
      name: '[dot][fail] Resolver with an invalid certificate'
      markers:
          - 'dot'
          - 'fail'
      args:
          - '--dot'
          - '-v'
          - 'ns0.ldn-fai.net'
          - 'framagit.org'
      retcode: 1
      partstdout: 'certificate verify failed'

634
635
636
637
638
################################################################################

     # check_dot
    - exe: './check_dot'
      name: '[check_dot] Use an IPv6'
Alexandre's avatar
Alexandre committed
639
640
641
      markers:
          - 'dot'
          - 'monitoring'
642
643
644
645
646
647
648
649
650
651
652
653
654
      args:
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'OK'

    - exe: './check_dot'
      name: '[check_dot] Use IPv6 address and force IPv6'
Alexandre's avatar
Alexandre committed
655
656
657
      markers:
          - 'dot'
          - 'monitoring'
658
          - 'forceIPv6'
659
660
661
662
663
664
665
666
667
668
669
670
671
672
      args:
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'OK'

    - exe: './check_dot'
      name: '[check_dot] Use an IPv4'
Alexandre's avatar
Alexandre committed
673
674
675
      markers:
          - 'dot'
          - 'monitoring'
676
677
678
679
680
681
682
683
684
685
686
687
688
      args:
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'OK'

    - exe: './check_dot'
      name: '[check_dot] Use IPv4 address and force IPv4'
Alexandre's avatar
Alexandre committed
689
690
691
      markers:
          - 'dot'
          - 'monitoring'
692
          - 'forceIPv4'
693
694
695
696
697
698
699
700
701
702
703
704
705
706
      args:
          - '-4'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'OK'

    - exe: './check_dot'
      name: '[check_dot] Force IPv4 and IPv6 with an IPv6'
Alexandre's avatar
Alexandre committed
707
708
709
710
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
711
712
          - 'forceIPv4'
          - 'forceIPv6'
713
714
715
716
717
718
719
720
721
      args:
          - '-4'
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
722
723
724
      retcode: 2
      stderr: ''
      partstout: 'IPv4 *or* IPv6'
725
726
727

    - exe: './check_dot'
      name: '[check_dot] Force IPv4 and IPv6 with an IPv4'
Alexandre's avatar
Alexandre committed
728
729
730
731
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
732
733
          - 'forceIPv4'
          - 'forceIPv6'
734
735
736
737
738
739
740
741
742
      args:
          - '-4'
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
743
744
745
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
746
747
748

    - exe: './check_dot'
      name: '[check_dot] Use IPv4 address and force IPv6'
Alexandre's avatar
Alexandre committed
749
750
751
752
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
753
          - 'forceIPv6'
754
755
756
757
758
759
760
761
      args:
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
762
763
764
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv4'
765
766
767

    - exe: './check_dot'
      name: '[check_dot] Use IPv6 address and force IPv4'
Alexandre's avatar
Alexandre committed
768
769
770
771
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
772
          - 'forceIPv4'
773
774
775
776
777
778
779
780
      args:
          - '-4'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
781
782
783
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv6'
784

785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
    - exe: './check_dot'
      name: '[check_dot] Test there is the expected string'
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
      args:
          - '-H'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'ressources-pedagogiques.org'
          - '-e'
          - '2605:4500:2:245b::42'
      retcode: 0
      stderr: ''
      partstdout: 'OK - No error'

    - exe: './check_dot'
      name: '[check_dot] Test there is *not* the expected string'
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
      args:
          - '-H'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'ressources-pedagogiques.org'
          - '-e'
          - 'foobar'
      retcode: 2
      stderr: ''
      partstdout: 'Cannot find'

819
820
821
822
823
824

################################################################################

     # check_doh
    - exe: './check_doh'
      name: '[check_doh] Use an IPv6'
Alexandre's avatar
Alexandre committed
825
826
827
      markers:
          - 'doh'
          - 'monitoring'
828
829
830
831
832
833
834
835
836
837
838
839
840
      args:
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'OK'

    - exe: './check_doh'
      name: '[check_doh] Use IPv6 address and force IPv6'
Alexandre's avatar
Alexandre committed
841
842
843
      markers:
          - 'doh'
          - 'monitoring'
844
          - 'forceIPv6'
845
846
847
848
849
850
851
852
853
854
855
856
857
858
      args:
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'OK'

    - exe: './check_doh'
      name: '[check_doh] Use an IPv4'
Alexandre's avatar
Alexandre committed
859
860
861
      markers:
          - 'doh'
          - 'monitoring'
862
863
864
865
866
867
868
869
870
871
872
873
874
      args:
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'OK'

    - exe: './check_doh'
      name: '[check_doh] Use IPv4 address and force IPv4'
Alexandre's avatar
Alexandre committed
875
876
877
      markers:
          - 'doh'
          - 'monitoring'
878
          - 'forceIPv4'
879
880
881
882
883
884
885
886
887
888
889
890
891
892
      args:
          - '-4'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'OK'

    - exe: './check_doh'
      name: '[check_doh] Force IPv4 and IPv6 with an IPv6'
Alexandre's avatar
Alexandre committed
893
894
895
896
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
897
898
          - 'forceIPv4'
          - 'forceIPv6'
899
900
901
902
903
904
905
906
907
      args:
          - '-4'
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
908
909
910
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
911
912
913

    - exe: './check_doh'
      name: '[check_doh] Force IPv4 and IPv6 with an IPv4'
Alexandre's avatar
Alexandre committed
914
915
916
917
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
918
919
          - 'forceIPv4'
          - 'forceIPv6'
920
921
922
923
924
925
926
927
928
      args:
          - '-4'
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
929
930
931
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
932
933
934

    - exe: './check_doh'
      name: '[check_doh] Use IPv4 address and force IPv6'
Alexandre's avatar
Alexandre committed
935
936
937
938
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
939
          - 'forceIPv6'
940
941
942
943
944
945
946
947
      args:
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
948
949
950
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv4'
951
952
953

    - exe: './check_doh'
      name: '[check_doh] Use IPv6 address and force IPv4'
Alexandre's avatar
Alexandre committed
954
955
956
957
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
958
          - 'forceIPv4'
959
960
961
962
963
964
965
966
      args:
          - '-4'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
967
968
969
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv6'
970

971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
    - exe: './check_doh'
      name: '[check_doh] Test there is the expected string'
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
      args:
          - '-H'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'ressources-pedagogiques.org'
          - '-e'
          - '2605:4500:2:245b::42'
      retcode: 0
      stderr: ''
      partstdout: 'OK - No error'

    - exe: './check_doh'
      name: '[check_doh] Test there is *not* the expected string'
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
      args:
          - '-H'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'ressources-pedagogiques.org'
          - '-e'
          - 'foobar'
      retcode: 2
      stderr: ''
      partstdout: 'Cannot find'

Alexandre's avatar
Alexandre committed
1005
1006
1007
1008
################################################################################

    - exe: './homer.py'
      name: '[doh] HEAD and POST'
Alexandre's avatar
Alexandre committed
1009
1010
1011
      markers:
          - 'doh'
          - 'exception'
Alexandre's avatar
Alexandre committed
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
      args:
          - '--head'
          - '--POST'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'POST or HEAD'
      stdout: ''

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
      name: '[doh] POST --post'
      markers:
          - 'doh'
      args:
          - '--post'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      name: '[doh] POST --POST'
Alexandre's avatar
Alexandre committed
1035
1036
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
1037
1038
1039
1040
1041
1042
1043
1044
1045
      args:
          - '--POST'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
      name: '[doh] POST -P'
      markers:
          - 'doh'
      args:
          - '-P'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      name: '[doh] HEAD --head'
Alexandre's avatar
Alexandre committed
1059
1060
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
1061
1062
1063
1064
1065
1066
1067
      args:
          - '--head'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'
Alexandre's avatar
Alexandre committed
1068

Alexandre's avatar
Alexandre committed
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
    - exe: './homer.py'
      name: '[doh] HEAD --HEAD'
      markers:
          - 'doh'
      args:
          - '--HEAD'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'

    - exe: './homer.py'
      name: '[doh] HEAD -e'
      markers:
          - 'doh'
      args:
          - '-e'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'

Alexandre's avatar
Alexandre committed
1093
    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1094
      name: '[doh] Multistreams with DoT (error)'
Alexandre's avatar
Alexandre committed
1095
1096
1097
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1098
          - 'exception'
Alexandre's avatar
Alexandre committed
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
      args:
          - '--multistreams'
          - '--dot'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Multi-streams makes no sense for DoT'
      stdout: ''

    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1109
      name: '[doh] Multistreams without input file (error)'
Alexandre's avatar
Alexandre committed
1110
1111
1112
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1113
          - 'exception'
Alexandre's avatar
Alexandre committed
1114
1115
1116
1117
1118
1119
1120
1121
1122
      args:
          - '--multistreams'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Multi-streams requires an input file'
      stdout: ''

    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1123
      name: '[doh] Multistreams too many arguments (error)'
Alexandre's avatar
Alexandre committed
1124
1125
1126
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1127
          - 'exception'
Alexandre's avatar
Alexandre committed
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Wrong number of arguments'
      stdout: ''

    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1139
      name: '[doh] Multistreams invalid URL'
Alexandre's avatar
Alexandre committed
1140
1141
1142
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1143
          - 'exception'
Alexandre's avatar
Alexandre committed
1144
1145
1146
1147
1148
1149
1150
1151
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'dot.bortzmeyer.fr'
      retcode: 1
      partstderr: 'DoH requires a valid'
      stdout: ''
Alexandre's avatar
Alexandre committed
1152

Alexandre's avatar
Alexandre committed
1153
    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1154
      name: '[doh] Multistreams with 1 request'
Alexandre's avatar
Alexandre committed
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
      markers:
          - 'doh'
          - 'streams'
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'https://doh.bortzmeyer.fr'
      retcode: 0
      stderr: ''
      partstdout: 'NOERR'
Alexandre's avatar
Alexandre committed
1166

1167
1168
1169
1170
1171
      # This test might fail
      # this is due to the fact that it will check that libcurl
      # uses HTTP/2 streams or sometimes the connection is
      # available very quickly making unnecessary to use
      # different streams
Alexandre's avatar
Alexandre committed
1172
    - exe : './homer.py'
1173
      name: '[doh] Multistreams with 3 requests (can fail)'
Alexandre's avatar
Alexandre committed
1174
1175
1176
      markers:
          - 'doh'
          - 'streams'
1177
          - 'xfail'
Alexandre's avatar
Alexandre committed
1178
1179
1180
1181
1182
1183
      args:
          - '-v'
          - '--multistreams'
          - '--file'
          - 'input_file'
          - '--repeat'
1184
1185
          - '3'
          - 'https://doh.powerdns.org'
Alexandre's avatar
Alexandre committed
1186
1187
1188
1189
      retcode: 0
      partstderr: 'Multiplexed connection found'
      partstdout: 'Return code 200'

1190
      # same as previous test
Alexandre's avatar
Alexandre committed
1191
1192
1193
1194
1195
    - exe : './homer.py'
      name: '[doh] Multistreams with 5 requests'
      markers:
          - 'doh'
          - 'streams'
1196
          - 'xfail'
Alexandre's avatar
Alexandre committed
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
      args:
          - '-v'
          - '--multistreams'
          - '--file'
          - 'input_file'
          - '--repeat'
          - '5'
          - 'https://doh.bortzmeyer.fr'
      retcode: 0
      partstderr: 'Multiplexed connection found'
      partstdout: 'Return code 200'