diff options
| author | Barak Shohat <barak@bazzisoft.com> | 2021-04-07 12:34:46 +0300 |
|---|---|---|
| committer | Barak Shohat <barak@bazzisoft.com> | 2021-04-07 15:38:47 +0300 |
| commit | 6993c216955a54845d98dc568534613334c0b545 (patch) | |
| tree | 5c69050db7d0407f7fb668a40fdc8d5620527596 /plugins/t | |
| parent | 57b4dc0f2307cd49bedeed01ee56bc6077d428f5 (diff) | |
| download | monitoring-plugins-6993c21.tar.gz | |
Add an option to check_curl to verify the peer certificate & host using the system CA's
Diffstat (limited to 'plugins/t')
| -rw-r--r-- | plugins/t/check_curl.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/t/check_curl.t b/plugins/t/check_curl.t index 4bff538a..55577add 100644 --- a/plugins/t/check_curl.t +++ b/plugins/t/check_curl.t | |||
| @@ -9,7 +9,7 @@ use Test::More; | |||
| 9 | use POSIX qw/mktime strftime/; | 9 | use POSIX qw/mktime strftime/; |
| 10 | use NPTest; | 10 | use NPTest; |
| 11 | 11 | ||
| 12 | plan tests => 57; | 12 | plan tests => 58; |
| 13 | 13 | ||
| 14 | my $successOutput = '/OK.*HTTP.*second/'; | 14 | my $successOutput = '/OK.*HTTP.*second/'; |
| 15 | 15 | ||
| @@ -94,6 +94,9 @@ SKIP: { | |||
| 94 | 94 | ||
| 95 | $res = NPTest->testCmd("./$plugin -v -H $host_tls_http:443 -S -p 443"); | 95 | $res = NPTest->testCmd("./$plugin -v -H $host_tls_http:443 -S -p 443"); |
| 96 | like( $res->output, '/^Host: '.$host_tls_http.'\s*$/ms', "Host Header OK" ); | 96 | like( $res->output, '/^Host: '.$host_tls_http.'\s*$/ms', "Host Header OK" ); |
| 97 | |||
| 98 | $res = NPTest->testCmd("./$plugin -v -H $host_tls_http -D -p 443"); | ||
| 99 | like( $res->output, '/(^Host: '.$host_tls_http.'\s*$)|(cURL returned 60)/ms', "Host Header OK" ); | ||
| 97 | }; | 100 | }; |
| 98 | 101 | ||
| 99 | SKIP: { | 102 | SKIP: { |
