Commit 247f007c authored by Alexandre's avatar Alexandre
Browse files

Merge branch 'master' into streams

parents 2fc229b5 a34ecfa4
......@@ -107,6 +107,7 @@ monitoring plugins conventions:
* -n: domain name to lookup
* -t: DNS type to query
* -p: (DoH) path in the URLx
* -e: a string to expect in the result
* -P: uses the HTTP method POST
* -h: uses the HTTP method HEAD
* -i: insecure (do not check the certificate)
......@@ -121,6 +122,7 @@ object CheckCommand "doh_monitor" {
"-H" = "$address6$",
"-n" = "$doh_lookup$",
"-p" = "$doh_path$",
"-e" = "$doh_expect$",
"-V" = "$doh_vhost$",
"-t" = "$doh_type$",
"-P" = "$doh_post$",
......@@ -136,6 +138,7 @@ object CheckCommand "dot_monitor" {
"-H" = "$address6$",
"-n" = "$dot_lookup$",
"-p" = "$dot_path$",
"-e" = "$dot_expect$",
"-V" = "$dot_vhost$",
"-t" = "$dot_type$",
"-P" = "$dot_post$",
......@@ -194,8 +197,9 @@ python3-pycurl` will install everything you need.
### Testing
The tests configured in `tests.yaml` require a patched version of
https://framagit.org/feth/test_exe_matrix. Then, just `test_exe_matrix tests.yaml`.
The tests configured in `tests.yaml` require
https://framagit.org/feth/test_exe_matrix. Then, just `test_exe_matrix
tests.yaml`.
## Public servers
......@@ -241,7 +245,7 @@ GPL. See LICENSE.
## Author
Stéphane Bortzmeyer <stephane+framagit@bortzmeyer.org>
Stéphane Bortzmeyer <stephane+framagit@bortzmeyer.org> and Alexandre Pion
## Reference site
......
homer.py
\ No newline at end of file
./homer.py
\ No newline at end of file
This diff is collapsed.
---
config:
timeout: 2
markers:
- "dot: test specific to DoT"
- "doh: test specific to DoH"
- "monitoring: test using monitoring"
- "exception: test raising an exception"
- "streams: test multistreams with DoH"
tests:
- exe: './homer.py'
args:
- '-h'
retcode: 0
partstderr: 'url-or-servername domain-name [DNS type]'
stdout: ''
- exe: './homer.py'
args:
- '--zzz'
retcode: 1
partstderr: 'url-or-servername domain-name [DNS type]'
stdout: ''
- 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:'
- exe : './homer.py'
args:
- '--multistreams'
- '--dot'
- 'dot.bortzmeyer.fr'
- 'framagit.org'
retcode: 1
partstderr: 'Multi-streams makes no sense for DoT'
stdout: ''
- exe : './homer.py'
args:
- '--multistreams'
- 'dot.bortzmeyer.fr'
- 'framagit.org'
retcode: 1
partstderr: 'Multi-streams requires an input file'
stdout: ''
- exe : './homer.py'
args:
- '--multistreams'
- '--file'
- 'input_file'
- 'dot.bortzmeyer.fr'
- 'framagit.org'
retcode: 1
partstderr: 'Wrong number of arguments'
stdout: ''
- exe : './homer.py'
args:
- '--multistreams'
- '--file'
- 'input_file'
- 'dot.bortzmeyer.fr'
retcode: 1
partstderr: 'DoH requires a valid'
stdout: ''
- exe : './homer.py'
args:
- '--multistreams'
- '--file'
- 'input_file'
- 'https://doh.bortzmeyer.fr'
retcode: 0
stderr: ''
partstdout: 'NOERR'
- exe: './homer.py'
args:
- '-h'
retcode: 0
partstderr: 'url-or-servername domain-name [DNS type]'
stdout: ''
- exe: './homer.py'
args:
- '--zzz'
retcode: 1
partstderr: 'url-or-servername domain-name [DNS type]'
stdout: ''
- 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:'
###############################################################################
- exe: './homer.py'
name: '[doh] Force IPv4 and IPv6'
markers:
- 'doh'
- 'exception'
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'
markers:
- 'dot'
- 'exception'
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)'
markers:
- 'dot'
- 'exception'
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)'
markers:
- 'dot'
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)'
markers:
- 'dot'
- 'exception'
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)'
markers:
- 'dot'
- 'exception'
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)'
markers:
- 'dot'
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)'
markers:
- 'dot'
- 'exception'
args:
- '-4'
- '--insecure'
- '--dot'
- '2001:620:0:ff::2'
- 'framagit.org'
retcode: 1
partstderr: 'litteral IPv6'
stdout: ''
- 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: ''
################################################################################
# check_dot
- exe: './check_dot'
name: '[check_dot] Use an IPv6'
markers:
- 'dot'
- 'monitoring'
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'
markers:
- 'dot'
- 'monitoring'
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'
markers:
- 'dot'
- 'monitoring'
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'
markers:
- 'dot'
- 'monitoring'
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'
markers:
- 'dot'
- 'monitoring'
- 'exception'
args:
- '-4'
- '-6'
- '-H'
- '2001:41d0:302:2200::180'
- '-V'
- 'dot.bortzmeyer.fr'
- '-n'
- 'framagit.org'
retcode: 2
stderr: ''
partstout: 'IPv4 *or* IPv6'
- exe: './check_dot'
name: '[check_dot] Force IPv4 and IPv6 with an IPv4'
markers:
- 'dot'
- 'monitoring'
- 'exception'
args:
- '-4'
- '-6'
- '-H'
- '193.70.85.11'
- '-V'
- 'dot.bortzmeyer.fr'
- '-n'
- 'framagit.org'
retcode: 2
stderr: ''
partstdout: 'IPv4 *or* IPv6'
- exe: './check_dot'
name: '[check_dot] Use IPv4 address and force IPv6'
markers:
- 'dot'
- 'monitoring'
- 'exception'
args:
- '-6'
- '-H'
- '193.70.85.11'
- '-V'
- 'dot.bortzmeyer.fr'
- '-n'
- 'framagit.org'
retcode: 2
stderr: ''
partstdout: 'litteral IPv4'
- exe: './check_dot'
name: '[check_dot] Use IPv6 address and force IPv4'
markers:
- 'dot'
- 'monitoring'
- 'exception'
args:
- '-4'
- '-H'
- '2001:41d0:302:2200::180'
- '-V'
- 'dot.bortzmeyer.fr'
- '-n'
- 'framagit.org'
retcode: 2
stderr: ''
partstdout: 'litteral IPv6'
- 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'
################################################################################
# check_doh
- exe: './check_doh'
name: '[check_doh] Use an IPv6'
markers:
- 'doh'
- 'monitoring'
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'
markers:
- 'doh'
- 'monitoring'
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'
markers:
- 'doh'
- 'monitoring'
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'
markers:
- 'doh'
- 'monitoring'
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'
markers:
- 'doh'
- 'monitoring'
- 'exception'
args:
- '-4'
- '-6'
- '-H'
- '2001:41d0:302:2200::180'
- '-V'
- 'doh.bortzmeyer.fr'
- '-n'
- 'framagit.org'
retcode: 2
stderr: ''
partstdout: 'IPv4 *or* IPv6'
- exe: './check_doh'
name: '[check_doh] Force IPv4 and IPv6 with an IPv4'
markers:
- 'doh'
- 'monitoring'
- 'exception'
args:
- '-4'
- '-6'
- '-H'
- '193.70.85.11'
- '-V'
- 'doh.bortzmeyer.fr'
- '-n'
- 'framagit.org'
retcode: 2
stderr: ''
partstdout: 'IPv4 *or* IPv6'
- exe: './check_doh'
name: '[check_doh] Use IPv4 address and force IPv6'
markers:
- 'doh'
- 'monitoring'
- 'exception'
args:
- '-6'
- '-H'
- '193.70.85.11'
- '-V'
- 'doh.bortzmeyer.fr'
- '-n'
- 'framagit.org'
retcode: 2
stderr: ''
partstdout: 'litteral IPv4'
- exe: './check_doh'
name: '[check_doh] Use IPv6 address and force IPv4'
markers:
- 'doh'
- 'monitoring'