tests.yaml 29.7 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"
14
      - "fail: mark test with a resolver currently failing our tests"
Alexandre's avatar
Alexandre committed
15
      - "slow: test that need time to run"
16

17
18
tests:
    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
19
      name: 'Usage'
20
21
22
      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
    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
27
      name: 'Unknown option'
28
29
30
      args:
          - '--zzz'
      retcode: 1
31
      partstderr: 'option --zzz not recognized'
32
      stdout: ''
Stephane Bortzmeyer's avatar
Stephane Bortzmeyer committed
33

34
    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
35
36
37
      name: '[doh] Simple resolution'
      markers:
          - 'doh'
38
39
40
41
42
43
44
45
      args:
          - 'https://doh.bortzmeyer.fr/'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
46
47
48
      name: '[dot] Simple resolution'
      markers:
          - 'dot'
49
50
51
52
53
54
55
      args:
          - '--dot'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'
Stephane Bortzmeyer's avatar
Stephane Bortzmeyer committed
56

Alexandre's avatar
Alexandre committed
57
58
59
60
61
62
63
64
65
66
67
    - exe: './homer.py'
      markers:
          - 'exception'
      args:
          - '--dot'
          - 'https//doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'not a name or'
      stdout: ''

68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
    - exe: './homer.py'
      name: '[doh] Repeat single test'
      markers:
          - 'doh'
      args:
          - '--repeat'
          - '3'
          - 'https://doh.bortzmeyer.fr/'
          - 'wikimedia.org'
      retcode: 0
      partstdout: "NOERR"

    - exe: './homer.py'
      name: '[dot] Repeat single test'
      markers:
          - 'dot'
      args:
          - '--dot'
          - '--repeat'
          - '5'
          - 'dot.bortzmeyer.fr'
          - 'framasoft.org'
      retcode: 0
      partstdout: "Test 4\n"

93
94
95
96
97
###############################################################################

    - exe: './homer.py'
      name: '--check of a correct DoH'
      markers:
98
99
          - 'doh'
          - 'check'
100
101
102
103
104
105
106
107
108
109
      args:
          - '--check'
          - 'https://doh.bortzmeyer.fr/'
          - 'ressources-pedagogiques.org'
      retcode: 0
      stdout: "OK\n"

    - exe: './homer.py'
      name: '--check of a broken DoH'
      markers:
110
111
          - 'doh'
          - 'check'
112
113
114
115
116
117
118
119
120
121
122
      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:
123
124
          - 'doh'
          - 'check'
125
126
127
128
129
130
131
      args:
          - '--check'
          - '--mandatory-level'
          - 'nicetohave'
          - 'https://doh.42l.fr/dns-query'
          - 'ressources-pedagogiques.org'
      retcode: 1
Alexandre's avatar
Alexandre committed
132
      partstderr: "Test HEAD: HTTP error 405: [No details]\n"
133
134
135
136
137
      stdout: "KO\n"

    - exe: './homer.py'
      name: '--check of a correct DoT'
      markers:
138
139
          - 'dot'
          - 'check'
140
141
142
143
144
145
146
147
148
      args:
          - '--check'
          - '--dot'
          - 'dot.bortzmeyer.fr'
          - 'ressources-pedagogiques.org'
      retcode: 0
      stderr: ''
      stdout: "OK\n"

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
    - exe: './homer.py'
      name: '--check of a correct DoT with debug mode'
      markers:
          - 'dot'
          - 'check'
      args:
          - '--dot'
          - '--check'
          - '--debug'
          - 'dot.bortzmeyer.fr'
          - 'dnsforum.bj'
      retcode: 0
      stderr: ''
      partstdout: "OK\n"

Alexandre's avatar
Alexandre committed
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
    - 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
182
          - 'slow'
Alexandre's avatar
Alexandre committed
183
      timeout: 12
Alexandre's avatar
Alexandre committed
184
185
186
187
188
189
190
      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
191
    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
192
      name: '[doh][check] Test that all the resolved IPs are tried, try a first IP'
Alexandre's avatar
Alexandre committed
193
      markers:
194
195
          - 'doh'
          - 'check'
Alexandre's avatar
Alexandre committed
196
      args:
Alexandre's avatar
Alexandre committed
197
          - '--debug'
Alexandre's avatar
Alexandre committed
198
199
          - '--check'
          - 'https://doh.bortzmeyer.fr'
200
          - 'www.afnic.fr'
Alexandre's avatar
Alexandre committed
201
202
203
      partstderr: "Connecting to hostname: 2001:41d0:302:2200::180"

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
204
      name: '[doh][check] Test that all the resolved IPs are tried, try another IP'
Alexandre's avatar
Alexandre committed
205
      markers:
206
207
          - 'doh'
          - 'check'
Alexandre's avatar
Alexandre committed
208
      args:
Alexandre's avatar
Alexandre committed
209
          - '--debug'
Alexandre's avatar
Alexandre committed
210
211
          - '--check'
          - 'https://doh.bortzmeyer.fr'
212
          - 'curl.haxx.se'
Alexandre's avatar
Alexandre committed
213
214
215
      partstderr: "Connecting to hostname: 193.70.85.11"

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
216
      name: '[dot][check] Test that all the resolved IPs are tried, try a first IP'
Alexandre's avatar
Alexandre committed
217
      markers:
218
219
          - 'dot'
          - 'check'
Alexandre's avatar
Alexandre committed
220
221
222
223
224
      args:
          - '-v'
          - '--check'
          - '--dot'
          - 'dot.bortzmeyer.fr'
225
          - 'www.afnic.fr'
Alexandre's avatar
Alexandre committed
226
      partstdout: "on 193.70.85.11 ...\nConnecting to 193.70.85.11 ..."
Alexandre's avatar
Alexandre committed
227
228

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
229
      name: '[doh][check] Test that all the resolved IPs are tried, try another IP'
Alexandre's avatar
Alexandre committed
230
      markers:
231
232
          - 'dot'
          - 'check'
Alexandre's avatar
Alexandre committed
233
234
235
236
237
      args:
          - '-v'
          - '--check'
          - '--dot'
          - 'dot.bortzmeyer.fr'
238
          - 'www.afnic.fr'
Alexandre's avatar
Alexandre committed
239
      partstdout: "on 2001:41d0:302:2200::180 ...\nConnecting to 2001:41d0:302:2200::180 ..."
240
241

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
242
      name: '[dot][check] Test all the IPs, force IPv4'
243
244
245
246
247
248
249
250
251
252
253
      markers:
          - 'dot'
          - 'check'
          - 'forceIPv4'
      args:
          - '-v'
          - '-4'
          - '--check'
          - '--dot'
          - 'dns.google'
          - 'framagit.org'
Alexandre's avatar
Alexandre committed
254
      partstdout: "on 8.8.8.8 ...\nConnecting to 8.8.8.8 ..."
255
256

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
257
      name: '[dot][check] Test all the IPs, force IPv4, check another IP'
258
259
260
261
262
263
264
265
266
267
268
      markers:
          - 'dot'
          - 'check'
          - 'forceIPv4'
      args:
          - '-v'
          - '-4'
          - '--check'
          - '--dot'
          - 'dns.google'
          - 'framagit.org'
Alexandre's avatar
Alexandre committed
269
      partstdout: "on 8.8.4.4 ...\nConnecting to 8.8.4.4 ..."
270
271

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
272
      name: '[dot][check] Test all the IPs, force IPv6'
273
274
275
276
277
278
279
280
281
282
283
      markers:
          - 'dot'
          - 'check'
          - 'forceIPv6'
      args:
          - '-v'
          - '-6'
          - '--check'
          - '--dot'
          - 'dns.google'
          - 'framagit.org'
Alexandre's avatar
Alexandre committed
284
      partstdout: "on 2001:4860:4860::8844 ...\nConnecting to 2001:4860:4860::8844 ..."
285
286

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
287
      name: '[dot][check] Test all the IPs, force IPv6, check another IP'
288
289
290
291
292
293
294
295
296
297
298
      markers:
          - 'dot'
          - 'check'
          - 'forceIPv6'
      args:
          - '-v'
          - '-6'
          - '--check'
          - '--dot'
          - 'dns.google'
          - 'framagit.org'
Alexandre's avatar
Alexandre committed
299
      partstdout: "on 2001:4860:4860::8888 ...\nConnecting to 2001:4860:4860::8888 ..."
300
301

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
302
      name: '[doh][check] Test all the IPs, force IPv4'
303
304
305
306
307
      markers:
          - 'doh'
          - 'check'
          - 'forceIPv4'
      args:
Alexandre's avatar
Alexandre committed
308
          - '--debug'
309
310
311
312
313
314
315
          - '-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
316
      name: '[doh][check] Test all the IPs, force IPv4, check another IP'
317
318
319
320
321
      markers:
          - 'doh'
          - 'check'
          - 'forceIPv4'
      args:
Alexandre's avatar
Alexandre committed
322
          - '--debug'
323
324
325
326
327
328
329
          - '-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
330
      name: '[doh][check] Test all the IPs, force IPv6'
331
332
333
334
335
      markers:
          - 'doh'
          - 'check'
          - 'forceIPv6'
      args:
Alexandre's avatar
Alexandre committed
336
          - '--debug'
337
338
339
340
341
342
343
          - '-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
344
      name: '[doh][check] Test all the IPs, force IPv6, check another IP'
345
346
347
348
349
      markers:
          - 'doh'
          - 'check'
          - 'forceIPv6'
      args:
Alexandre's avatar
Alexandre committed
350
          - '--debug'
351
352
353
354
355
          - '-6'
          - '--check'
          - 'https://dns.google/dns-query'
          - 'curl.haxx.se'
      partstderr: "Connecting to hostname: 2001:4860:4860::8844"
Alexandre's avatar
Alexandre committed
356

Alexandre's avatar
Alexandre committed
357
358
359
360
361
362
    - exe: './homer.py'
      name: '[dot][check] Test all IPs on brok.sources.org'
      timeout: 6
      markers:
          - 'dot'
          - 'check'
Alexandre's avatar
Alexandre committed
363
          - 'slow'
Alexandre's avatar
Alexandre committed
364
365
366
367
368
369
      args:
          - '-k'
          - '--check'
          - '--dot'
          - 'brok.sources.org'
          - 'in'
Alexandre's avatar
Alexandre committed
370
      partstderr: 'Could not connect to'
371
372
373
374
375
376
377

    - 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
378
          - 'slow'
379
380
381
382
383
384
      args:
          - '-k'
          - '--check'
          - '--dot'
          - 'brok.sources.org'
          - 'in'
385
      partstdout: "KO\n"
Alexandre's avatar
Alexandre committed
386

387

388
389
390
391
###############################################################################

    - exe: './homer.py'
      name: '[doh] Force IPv4 and IPv6'
Alexandre's avatar
Alexandre committed
392
393
394
      markers:
          - 'doh'
          - 'exception'
395
396
          - 'forceIPv4'
          - 'forceIPv6'
397
398
399
400
401
402
403
404
405
406
407
      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
408
409
410
      markers:
          - 'dot'
          - 'exception'
411
412
          - 'forceIPv4'
          - 'forceIPv6'
413
414
415
416
417
418
419
420
421
422
423
424
      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
425
426
427
      markers:
          - 'dot'
          - 'exception'
428
429
430
431
432
433
434
435
436
437
      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
438
439
      markers:
          - 'dot'
440
441
442
443
444
445
446
447
448
449
450
      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
451
452
453
      markers:
          - 'dot'
          - 'exception'
454
          - 'forceIPv6'
455
456
457
458
459
460
461
462
463
464
465
466
      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
467
468
469
      markers:
          - 'dot'
          - 'exception'
470
471
472
473
474
475
476
477
478
479
      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
480
481
      markers:
          - 'dot'
482
483
484
485
486
487
488
489
490
491
492
      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
493
494
495
      markers:
          - 'dot'
          - 'exception'
496
          - 'forceIPv4'
497
498
499
500
501
502
503
504
505
506
      args:
          - '-4'
          - '--insecure'
          - '--dot'
          - '2001:620:0:ff::2'
          - 'framagit.org'
      retcode: 1
      partstderr: 'litteral IPv6'
      stdout: ''

Alexandre's avatar
Alexandre committed
507
508
509
510
    - exe: './homer.py'
      name: '[dot] Loop on all ips on connection error (brok.sources.org)'
      markers:
          - 'dot'
Alexandre's avatar
Alexandre committed
511
          - 'slow'
Alexandre's avatar
Alexandre committed
512
513
514
515
516
517
518
519
520
521
522
523
524
525
      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'
526
          - 'forceIPv6'
Alexandre's avatar
Alexandre committed
527
          - 'slow'
Alexandre's avatar
Alexandre committed
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
      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: ''

552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
    - 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
580

Alexandre's avatar
Alexandre committed
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
    # as of 20200902, this test is now failing, the OpenSSL error disappeared
    #    - exe: './homer.py'
    #      name: '[dot][exception] Catch OpenSSL.SSL.SysCallError'
    #      markers:
    #          - 'dot'
    #          - 'exception'
    #          - 'forceIPv4'
    #      args:
    #          - '--dot'
    #          - '--v4only'
    #          - '--verbose'
    #          - 'dnsotls.lab.nic.cl'
    #          - 'wikipedia.org'
    #      retcode: 1
    #      partstderr: 'OpenSSL error: Unexpected EOF'
596
597


Alexandre's avatar
Alexandre committed
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
    - exe: './homer.py'
      name: '[dot][exception] Catch error with SNI set with IPv6 address'
      markers:
          - 'dot'
          - 'exception'
      args:
          - '--dot'
          - '--insecure'
          - '--verbose'
          - '2001:41d0:302:2200::180'
          - 'toto.fr'
      retcode: 1
      partstderr: 'The SSL connection has been closed (try with --nosni'


Alexandre's avatar
Alexandre committed
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
################################################################################

    - 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"

655
656
657

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

658
    - exe: './homer.py'
659
      name: '[dot][check] Resolver returning a malformed DNS message'
660
661
662
      markers:
          - 'dot'
          - 'check'
663
          - 'exception'
664
665
666
667
668
      args:
          - '--dot'
          - '--check'
          - 'dns.digitale-gesellschaft.ch'
          - 'framagit.org'
669
670
671
      retcode: 0
      stderr: ''
      stdout: "OK\n"
672

Alexandre's avatar
Alexandre committed
673
674
675
676
677
678
679
680
681
682
683
    - 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
684
      partstderr: 'certificate verify failed'
Alexandre's avatar
Alexandre committed
685

686
687
688
689
690
################################################################################

     # check_dot
    - exe: './check_dot'
      name: '[check_dot] Use an IPv6'
Alexandre's avatar
Alexandre committed
691
692
693
      markers:
          - 'dot'
          - 'monitoring'
694
695
696
697
698
699
700
701
702
703
704
705
706
      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
707
708
709
      markers:
          - 'dot'
          - 'monitoring'
710
          - 'forceIPv6'
711
712
713
714
715
716
717
718
719
720
721
722
723
724
      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
725
726
727
      markers:
          - 'dot'
          - 'monitoring'
728
729
730
731
732
733
734
735
736
737
738
739
740
      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
741
742
743
      markers:
          - 'dot'
          - 'monitoring'
744
          - 'forceIPv4'
745
746
747
748
749
750
751
752
753
754
755
756
757
758
      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
759
760
761
762
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
763
764
          - 'forceIPv4'
          - 'forceIPv6'
765
766
767
768
769
770
771
772
773
      args:
          - '-4'
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
774
775
776
      retcode: 2
      stderr: ''
      partstout: 'IPv4 *or* IPv6'
777
778
779

    - exe: './check_dot'
      name: '[check_dot] Force IPv4 and IPv6 with an IPv4'
Alexandre's avatar
Alexandre committed
780
781
782
783
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
784
785
          - 'forceIPv4'
          - 'forceIPv6'
786
787
788
789
790
791
792
793
794
      args:
          - '-4'
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
795
796
797
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
798
799
800

    - exe: './check_dot'
      name: '[check_dot] Use IPv4 address and force IPv6'
Alexandre's avatar
Alexandre committed
801
802
803
804
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
805
          - 'forceIPv6'
806
807
808
809
810
811
812
813
      args:
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
814
815
816
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv4'
817
818
819

    - exe: './check_dot'
      name: '[check_dot] Use IPv6 address and force IPv4'
Alexandre's avatar
Alexandre committed
820
821
822
823
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
824
          - 'forceIPv4'
825
826
827
828
829
830
831
832
      args:
          - '-4'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
833
834
835
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv6'
836

837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
    - 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'

871
872
873
874
875
876
877
878
879
880
881
882
883
884
    - exe: './check_dot'
      name: '[check_dot] Certificate error'
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
      args:
          - '-H'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'dnsforum.bj'
      retcode: 2
      partstdout: 'certificate'

885
886
887
888
889
890

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

     # check_doh
    - exe: './check_doh'
      name: '[check_doh] Use an IPv6'
Alexandre's avatar
Alexandre committed
891
892
893
      markers:
          - 'doh'
          - 'monitoring'
894
895
896
897
898
899
900
901
902
903
904
905
906
      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
907
908
909
      markers:
          - 'doh'
          - 'monitoring'
910
          - 'forceIPv6'
911
912
913
914
915
916
917
918
919
920
921
922
923
924
      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
925
926
927
      markers:
          - 'doh'
          - 'monitoring'
928
929
930
931
932
933
934
935
936
937
938
939
940
      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
941
942
943
      markers:
          - 'doh'
          - 'monitoring'
944
          - 'forceIPv4'
945
946
947
948
949
950
951
952
953
954
955
956
957
958
      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
959
960
961
962
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
963
964
          - 'forceIPv4'
          - 'forceIPv6'
965
966
967
968
969
970
971
972
973
      args:
          - '-4'
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
974
975
976
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
977
978
979

    - exe: './check_doh'
      name: '[check_doh] Force IPv4 and IPv6 with an IPv4'
Alexandre's avatar
Alexandre committed
980
981
982
983
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
984
985
          - 'forceIPv4'
          - 'forceIPv6'
986
987
988
989
990
991
992
993
994
      args:
          - '-4'
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
995
996
997
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
998
999
1000

    - exe: './check_doh'
      name: '[check_doh] Use IPv4 address and force IPv6'
Alexandre's avatar
Alexandre committed
1001
1002
1003
1004
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
1005
          - 'forceIPv6'
1006
1007
1008
1009
1010
1011
1012
1013
      args:
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
1014
1015
1016
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv4'
1017
1018
1019

    - exe: './check_doh'
      name: '[check_doh] Use IPv6 address and force IPv4'
Alexandre's avatar
Alexandre committed
1020
1021
1022
1023
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
1024
          - 'forceIPv4'
1025
1026
1027
1028
1029
1030
1031
1032
      args:
          - '-4'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
1033
1034
1035
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv6'
1036

1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
    - 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'

1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
    - exe: './check_doh'
      name: '[check_doh] Certificate error'
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
      args:
          - '-H'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'dnsforum.bj'
      retcode: 2
      partstdout: 'certificate'

Alexandre's avatar
Alexandre committed
1085
1086
1087
1088
################################################################################

    - exe: './homer.py'
      name: '[doh] HEAD and POST'
Alexandre's avatar
Alexandre committed
1089
1090
1091
      markers:
          - 'doh'
          - 'exception'
Alexandre's avatar
Alexandre committed
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
      args:
          - '--head'
          - '--POST'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'POST or HEAD'
      stdout: ''

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
      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
1115
1116
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
1117
1118
1119
1120
1121
1122
1123
1124
1125
      args:
          - '--POST'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
Alexandre's avatar
Alexandre committed
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
      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
1139
1140
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
1141
1142
1143
1144
1145
1146
1147
      args:
          - '--head'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'
Alexandre's avatar
Alexandre committed
1148

Alexandre's avatar
Alexandre committed
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
    - 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
1173
    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1174
      name: '[doh] Multistreams with DoT (error)'
Alexandre's avatar
Alexandre committed
1175
1176
1177
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1178
          - 'exception'
Alexandre's avatar
Alexandre committed
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
      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
1189
      name: '[doh] Multistreams without input file (error)'
Alexandre's avatar
Alexandre committed
1190
1191
1192
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1193
          - 'exception'
Alexandre's avatar
Alexandre committed
1194
1195
1196
1197
1198
1199
1200
1201
1202
      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
1203
      name: '[doh] Multistreams too many arguments (error)'
Alexandre's avatar
Alexandre committed
1204
1205
1206
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1207
          - 'exception'
Alexandre's avatar
Alexandre committed
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
      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
1219
      name: '[doh] Multistreams invalid URL'
Alexandre's avatar
Alexandre committed
1220
1221
1222
      markers:
          - 'doh'
          - 'streams'
Alexandre's avatar
Alexandre committed
1223
          - 'exception'
Alexandre's avatar
Alexandre committed
1224
1225
1226
1227
1228
1229
1230
1231
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'dot.bortzmeyer.fr'
      retcode: 1
      partstderr: 'DoH requires a valid'
      stdout: ''
Alexandre's avatar
Alexandre committed
1232

Alexandre's avatar
Alexandre committed
1233
    - exe : './homer.py'
Alexandre's avatar
Alexandre committed
1234
      name: '[doh] Multistreams with 1 request'
Alexandre's avatar
Alexandre committed
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
      markers:
          - 'doh'
          - 'streams'
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'https://doh.bortzmeyer.fr'
      retcode: 0
      stderr: ''
      partstdout: 'NOERR'
Alexandre's avatar
Alexandre committed
1246

1247
1248
      # This test might fail
      # this is due to the fact that it will check that libcurl
Alexandre's avatar
Alexandre committed
1249
      # uses HTTP/2 streams but sometimes the connection is
1250
1251
      # available very quickly making unnecessary to use
      # different streams
Alexandre's avatar
Alexandre committed
1252
    - exe : './homer.py'
1253
      name: '[doh] Multistreams with 3 requests (can fail)'
Alexandre's avatar
Alexandre committed
1254
1255
1256
1257
      markers:
          - 'doh'
          - 'streams'
      args:
Alexandre's avatar
Alexandre committed
1258
          - '--debug'
Alexandre's avatar
Alexandre committed
1259
1260
1261
1262
          - '--multistreams'
          - '--file'
          - 'input_file'
          - '--repeat'
1263
1264
          - '3'
          - 'https://doh.powerdns.org'
Alexandre's avatar
Alexandre committed
1265
1266
1267
1268
      retcode: 0
      partstderr: 'Multiplexed connection found'
      partstdout: 'Return code 200'

1269
      # same as previous test
Alexandre's avatar
Alexandre committed
1270
1271
1272
1273
1274
1275
    - exe : './homer.py'
      name: '[doh] Multistreams with 5 requests'
      markers:
          - 'doh'
          - 'streams'
      args:
Alexandre's avatar
Alexandre committed
1276
          - '--debug'
Alexandre's avatar
Alexandre committed
1277
1278
1279
1280
1281
1282
1283
1284
1285
          - '--multistreams'
          - '--file'
          - 'input_file'
          - '--repeat'
          - '5'
          - 'https://doh.bortzmeyer.fr'
      retcode: 0
      partstderr: 'Multiplexed connection found'
      partstdout: 'Return code 200'