tests.yaml 11.6 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"
9

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

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

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

Alexandre's avatar
Alexandre committed
42
43
44
45
46
47
48
49
50
51
52
    - exe: './homer.py'
      markers:
          - 'exception'
      args:
          - '--dot'
          - 'https//doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 1
      partstderr: 'not a name or'
      stdout: ''

53
54
55
56
###############################################################################

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

Alexandre's avatar
Alexandre committed
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
198
199
200
201
202
203
204
205
206
207
    - 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: ''

208
209
210
211
212
################################################################################

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

    - exe: './check_dot'
      name: '[check_dot] Force IPv4 and IPv6 with an IPv4'
Alexandre's avatar
Alexandre committed
298
299
300
301
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
302
303
304
305
306
307
308
309
310
      args:
          - '-4'
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
311
312
313
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
314
315
316

    - exe: './check_dot'
      name: '[check_dot] Use IPv4 address and force IPv6'
Alexandre's avatar
Alexandre committed
317
318
319
320
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
321
322
323
324
325
326
327
328
      args:
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
329
330
331
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv4'
332
333
334

    - exe: './check_dot'
      name: '[check_dot] Use IPv6 address and force IPv4'
Alexandre's avatar
Alexandre committed
335
336
337
338
      markers:
          - 'dot'
          - 'monitoring'
          - 'exception'
339
340
341
342
343
344
345
346
      args:
          - '-4'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'dot.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
347
348
349
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv6'
350
351
352
353
354
355
356


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

     # check_doh
    - exe: './check_doh'
      name: '[check_doh] Use an IPv6'
Alexandre's avatar
Alexandre committed
357
358
359
      markers:
          - 'doh'
          - 'monitoring'
360
361
362
363
364
365
366
367
368
369
370
371
372
      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
373
374
375
      markers:
          - 'doh'
          - 'monitoring'
376
377
378
379
380
381
382
383
384
385
386
387
388
389
      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
390
391
392
      markers:
          - 'doh'
          - 'monitoring'
393
394
395
396
397
398
399
400
401
402
403
404
405
      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
406
407
408
      markers:
          - 'doh'
          - 'monitoring'
409
410
411
412
413
414
415
416
417
418
419
420
421
422
      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
423
424
425
426
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
427
428
429
430
431
432
433
434
435
      args:
          - '-4'
          - '-6'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
436
437
438
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
439
440
441

    - exe: './check_doh'
      name: '[check_doh] Force IPv4 and IPv6 with an IPv4'
Alexandre's avatar
Alexandre committed
442
443
444
445
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
446
447
448
449
450
451
452
453
454
      args:
          - '-4'
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
455
456
457
      retcode: 2
      stderr: ''
      partstdout: 'IPv4 *or* IPv6'
458
459
460

    - exe: './check_doh'
      name: '[check_doh] Use IPv4 address and force IPv6'
Alexandre's avatar
Alexandre committed
461
462
463
464
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
465
466
467
468
469
470
471
472
      args:
          - '-6'
          - '-H'
          - '193.70.85.11'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
473
474
475
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv4'
476
477
478

    - exe: './check_doh'
      name: '[check_doh] Use IPv6 address and force IPv4'
Alexandre's avatar
Alexandre committed
479
480
481
482
      markers:
          - 'doh'
          - 'monitoring'
          - 'exception'
483
484
485
486
487
488
489
490
      args:
          - '-4'
          - '-H'
          - '2001:41d0:302:2200::180'
          - '-V'
          - 'doh.bortzmeyer.fr'
          - '-n'
          - 'framagit.org'
491
492
493
      retcode: 2
      stderr: ''
      partstdout: 'litteral IPv6'
494

Alexandre's avatar
Alexandre committed
495
496
497
498
################################################################################

    - exe: './homer.py'
      name: '[doh] HEAD and POST'
Alexandre's avatar
Alexandre committed
499
500
501
      markers:
          - 'doh'
          - 'exception'
Alexandre's avatar
Alexandre committed
502
503
504
505
506
507
508
509
510
511
512
      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
513
514
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
515
516
517
518
519
520
521
522
523
524
      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
525
526
      markers:
          - 'doh'
Alexandre's avatar
Alexandre committed
527
528
529
530
531
532
533
      args:
          - '--head'
          - 'https://doh.bortzmeyer.fr'
          - 'framagit.org'
      retcode: 0
      stderr: ''
      partstdout: 'HEAD'