tests.yaml 14.3 KB
Newer Older
Stephane Bortzmeyer's avatar
Stephane Bortzmeyer committed
1
---
2
3
config:
  timeout: 2
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

Alexandre's avatar
Alexandre committed
11
tests:
12
13
14
15
16
17
    - exe: './homer.py'
      args:
          - '-h'
      retcode: 0
      partstderr: 'url-or-servername domain-name [DNS type]'
      stdout: ''
Stephane Bortzmeyer's avatar
Stephane Bortzmeyer committed
18

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

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    - 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
42

43
44
45
46
###############################################################################

    - exe: './homer.py'
      name: '[doh] Force IPv4 and IPv6'
Alexandre's avatar
Alexandre committed
47
48
49
      markers:
          - 'doh'
          - 'exception'
50
51
52
53
54
55
56
57
58
59
60
      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
61
62
63
      markers:
          - 'dot'
          - 'exception'
64
65
66
67
68
69
70
71
72
73
74
75
      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
76
77
78
      markers:
          - 'dot'
          - 'exception'
79
80
81
82
83
84
85
86
87
88
      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
89
90
      markers:
          - 'dot'
91
92
93
94
95
96
97
98
99
100
101
      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
102
103
104
      markers:
          - 'dot'
          - 'exception'
105
106
107
108
109
110
111
112
113
114
115
116
      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
117
118
119
      markers:
          - 'dot'
          - 'exception'
120
121
122
123
124
125
126
127
128
129
      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
130
131
      markers:
          - 'dot'
132
133
134
135
136
137
138
139
140
141
142
      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
143
144
145
      markers:
          - 'dot'
          - 'exception'
146
147
148
149
150
151
152
153
154
155
      args:
          - '-4'
          - '--insecure'
          - '--dot'
          - '2001:620:0:ff::2'
          - 'framagit.org'
      retcode: 1
      partstderr: 'litteral IPv6'
      stdout: ''

Alexandre's avatar
Alexandre committed
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
    - exe: './homer.py'
      name: '[dot] Loop on all ips on connection error (brok.sources.org)'
      markers:
          - 'dot'
      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'
      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: ''

198
199
200
201
202
################################################################################

     # check_dot
    - exe: './check_dot'
      name: '[check_dot] Use an IPv6'
Alexandre's avatar
Alexandre committed
203
204
205
      markers:
          - 'dot'
          - 'monitoring'
206
207
208
209
210
211
212
213
214
215
216
217
218
      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
219
220
221
      markers:
          - 'dot'
          - 'monitoring'
222
223
224
225
226
227
228
229
230
231
232
233
234
235
      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
236
237
238
      markers:
          - 'dot'
          - 'monitoring'
239
240
241
242
243
244
245
246
247
248
249
250
251
      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
252
253
254
      markers:
          - 'dot'
          - 'monitoring'
255
256
257
258
259
260
261
262
263
264
265
266
267
268
      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
269
270
271
272
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
273
274
275
276
277
278
279
280
281
      args:
          - '-4'
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
282
283
284
      retcode: 2
      stderr: ''
      partstout: 'IPv4 *or* IPv6'
285
286
287

    - exe: './check_dot'
      name: '[check_dot] Force IPv4 and IPv6 with an IPv4'
Alexandre's avatar
Alexandre committed
288
289
290
291
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
292
293
294
295
296
297
298
299
300
      args:
          - '-4'
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
301
302
303
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
304
305
306

    - exe: './check_dot'
      name: '[check_dot] Use IPv4 address and force IPv6'
Alexandre's avatar
Alexandre committed
307
308
309
310
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
311
312
313
314
315
316
317
318
      args:
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
319
320
321
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv4'
322
323
324

    - exe: './check_dot'
      name: '[check_dot] Use IPv6 address and force IPv4'
Alexandre's avatar
Alexandre committed
325
326
327
328
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
329
330
331
332
333
334
335
336
      args:
          - '-4'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
337
338
339
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv6'
340

341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
    - 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'

375
376
377
378
379
380

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

     # check_doh
    - exe: './check_doh'
      name: '[check_doh] Use an IPv6'
Alexandre's avatar
Alexandre committed
381
382
383
      markers:
          - 'doh'
          - 'monitoring'
384
385
386
387
388
389
390
391
392
393
394
395
396
      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
397
398
399
      markers:
          - 'doh'
          - 'monitoring'
400
401
402
403
404
405
406
407
408
409
410
411
412
413
      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
414
415
416
      markers:
          - 'doh'
          - 'monitoring'
417
418
419
420
421
422
423
424
425
426
427
428
429
      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
430
431
432
      markers:
          - 'doh'
          - 'monitoring'
433
434
435
436
437
438
439
440
441
442
443
444
445
446
      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
447
448
449
450
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
451
452
453
454
455
456
457
458
459
      args:
          - '-4'
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
460
461
462
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
463
464
465

    - exe: './check_doh'
      name: '[check_doh] Force IPv4 and IPv6 with an IPv4'
Alexandre's avatar
Alexandre committed
466
467
468
469
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
470
471
472
473
474
475
476
477
478
      args:
          - '-4'
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
479
480
481
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
482
483
484

    - exe: './check_doh'
      name: '[check_doh] Use IPv4 address and force IPv6'
Alexandre's avatar
Alexandre committed
485
486
487
488
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
489
490
491
492
493
494
495
496
      args:
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
497
498
499
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv4'
500
501
502

    - exe: './check_doh'
      name: '[check_doh] Use IPv6 address and force IPv4'
Alexandre's avatar
Alexandre committed
503
504
505
506
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
507
508
509
510
511
512
513
514
      args:
          - '-4'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
515
516
517
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv6'
518

519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
    - 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
553
554
555
556
################################################################################

    - exe: './homer.py'
      name: '[doh] HEAD and POST'
Alexandre's avatar
Alexandre committed
557
558
559
      markers:
          - 'doh'
          - 'exception'
Alexandre's avatar
Alexandre committed
560
561
562
563
564
565
566
567
568
569
570
      args:
          - '--head'
          - '--POST'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'POST or HEAD'
      stdout: ''

    - exe: './homer.py'
      name: '[doh] POST'
Alexandre's avatar
Alexandre committed
571
572
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
573
574
575
576
577
578
579
580
581
582
      args:
          - '--POST'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: '2a01:4f8:'

    - exe: './homer.py'
      name: '[doh] HEAD'
Alexandre's avatar
Alexandre committed
583
584
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
585
586
587
588
589
590
591
      args:
          - '--head'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'
Alexandre's avatar
Alexandre committed
592
593
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
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643

    - exe : './homer.py'
      markers:
          - 'doh'
          - 'streams'
      args:
          - '--multistreams'
          - '--dot'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Multi-streams makes no sense for DoT'
      stdout: ''

    - exe : './homer.py'
      markers:
          - 'doh'
          - 'streams'
      args:
          - '--multistreams'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Multi-streams requires an input file'
      stdout: ''

    - exe : './homer.py'
      markers:
          - 'doh'
          - 'streams'
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'dot.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'Wrong number of arguments'
      stdout: ''

    - exe : './homer.py'
      markers:
          - 'doh'
          - 'streams'
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'dot.bortzmeyer.fr'
      retcode: 1
      partstderr: 'DoH requires a valid'
      stdout: ''
Alexandre's avatar
Alexandre committed
644

Alexandre's avatar
Alexandre committed
645
646
647
648
649
650
651
652
653
654
655
656
    - exe : './homer.py'
      markers:
          - 'doh'
          - 'streams'
      args:
          - '--multistreams'
          - '--file'
          - 'input_file'
          - 'https://doh.bortzmeyer.fr'
      retcode: 0
      stderr: ''
      partstdout: 'NOERR'