Commit graph

41 commits

Author SHA1 Message Date
Sven Nierlein
b428cc17f7 tests: ignore sigpipes in https test daemon
check_http closes the connection after checking the certificate with -C. This leads to sigpipe
errors when the ssl daemon wants to send a response and the daemon quits which makes the
subsequent tests fail.
2021-05-20 20:57:59 +02:00
Sven Nierlein
eb75d847ae tests: increase startup sleep
github action might fail from to time otherwise
2021-05-20 18:04:49 +02:00
Sven Nierlein
072e97d5de tests: update expired test certificate
the certificate used to test expired http checks is to old to be used
with recent ssl libraries and results in:

> SSL routines:SSL_CTX_use_certificate:ee key too small

unfortunatly the error is only visible when setting $IO::Socket::SSL::DEBUG in
the check_http.t file.
2020-05-15 14:24:18 +02:00
Andreas Baumann
2f4d6764d7 Merge branch 'master' into feature_check_curl 2019-04-04 13:09:15 +02:00
Sven Nierlein
8442ed5b41 renew test certificates
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2019-02-19 16:35:28 +01:00
Sven Nierlein
e9239b556a check_curl: make check_curl use the same tests as check_http 2018-10-22 16:30:31 +02:00
Christopher Odenbach
9326543c2e Added tests for virtual port behaviour. Separated from all other tests this time. 2017-03-26 22:36:58 +02:00
Sven Nierlein
f938327b49 Revert "adopt http test to changed ssl expire date output"
This reverts commit 6cd50bc42c.
2016-11-11 10:52:36 +01:00
Sven Nierlein
3bdf392ae5 tests: make tests reliable for forcing the locale to C
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11 10:52:19 +01:00
Sven Nierlein
6cd50bc42c adopt http test to changed ssl expire date output
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11 09:43:13 +01:00
Peter (pir) Radcliffe
2f2b2f1987 GMT expiry display
Change solution to display GMT time in the local display format with
the offset number of hours from GMT to be clear about what timezone
this is if the local display format does not include offset.
2016-11-07 22:42:40 +01:00
Peter (pir) Radcliffe
06059ecd0e Revert "Fix check_http test time output"
This reverts commit 2d9e61a438.
2016-11-07 22:42:40 +01:00
Peter (pir) Radcliffe
2efad48e8c Fix check_http test time output
Tests need to match new output time and timezone.
2016-11-07 22:42:40 +01:00
Sven Nierlein
9c32acf5bb fix tests for certificates expire date with seconds 2015-10-02 16:27:12 +02:00
Holger Weiss
b785a770e4 plugins/tests/check_http.t: Adjust date strings
Adjust the expected date strings to the now-localized output produced by
plugins/sslutils.c.

Closes #1275.
2014-07-21 21:52:33 +02:00
Sven Nierlein
fb89accaaa require at least HTTP::Daemon 6.01
since the test uses send_header from HTTP::Daemon::ClientConn which has been introduced in
HTTP::Daemon 6.01
2014-06-13 14:01:12 +02:00
Sven Nierlein
c5a6c5136a tests: testCmd has own timeout which overwrites local one
so add configurable/optional timeout to testCmd.

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-12 13:56:48 +02:00
Monitoring Plugins Development Team
63734f52ab Project rename initial commit.
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
2014-01-19 14:18:47 -05:00
Holger Weiss
717b0e8d9c Fix the "check_http -d" tests 2013-08-18 18:31:59 +02:00
linkslice
2a8eab6b31 added ability to check regex against http headers. booyah! 2013-08-18 18:23:11 +02:00
Holger Weiss
66003414af tests/check_http.t: Fix whitespace issues
In tests/check_http.t, tabs are used for indentation.

While at it, apply another few cosmetic changes.
2012-08-10 12:49:30 +02:00
Holger Weiss
3f944a50b7 tests/check_http.t: Update the number of SSL tests 2012-08-10 12:41:41 +02:00
Holger Weiss
62d01df1fd tests/check_http.t: Fix test case
Fix the test case which is meant to make sure that

	check_http -C <n>,<m> [...]

returns a CRITICAL state if <m> is large enough.
2012-08-10 12:35:16 +02:00
William Leibzon
181260d636 added test case for certificate checs with both warning and critical values 2012-06-25 12:54:15 +02:00
Thomas Guyot-Sionnest
4611e41bc5 check_http: check for and print the certificate cn
This patch adds a check for the certificate cn (hostname) to normal
certificate checks. It returns CRITICAL if th cn is missing, otherwise it
prints it in the normal output.

Patch by Stéphane Urbanovski
2011-02-04 00:54:52 -05:00
Thomas Guyot-Sionnest
c49fed07c3 Fix minor test issues
My Test::More wouldn't print the total number of tests anymore, moving
the plan at the top appears to fix it.

At the same time I made check-http.t eval the special modules so it can
skip the tests instead of failing.
2010-11-30 23:57:04 -05:00
tonvoon
1252195ed5 Display missing search string and URL when failed (Duncan Ferguson #2999924) 2010-06-23 14:44:34 +00:00
Thomas Guyot-Sionnest
e7cdcfee2a check_http: add --onredirect=stickyport - also follow the same port 2009-03-21 02:32:50 -04:00
Thomas Guyot-Sionnest
31f2afcf4a tests/check_http.t: Add various timeout-related tests 2009-03-20 01:21:18 -04:00
Thomas Guyot-Sionnest
37e432ec77 Revert "Add timezone support and fix checks around cert expiration" (keep the expiration fix)
This reverts commit d41a33a434.
2009-03-19 01:04:33 -04:00
Thomas Guyot-Sionnest
d41a33a434 Add timezone support and fix checks around cert expiration 2009-03-18 03:34:25 -04:00
Thomas Guyot-Sionnest
d89d0b40f9 Update extended check_http tests for 0d78171...
Also add some tests, and make debug mode loop infinitely.
2009-03-16 03:09:15 -04:00
Ton Voon
674841e279 Create expired cert for testing purposes. Updated tests to check
expired and unexpired certificates
2009-03-06 00:24:38 +00:00
Ton Voon
8580335779 Added inline tests for HTTPS using HTTP::Daemon::SSL 2009-03-05 23:37:45 +00:00
Ton Voon
6c5f781bc5 Fixed bug where extra headers and redirect caused segfault (Dieter Van de Walle - 2089159)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2076 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-08 02:32:03 +00:00
Ton Voon
288b742ed6 check_http now has options to specify the HTTP method (Jan - 2155152)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2075 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-08 02:08:56 +00:00
Ton Voon
4181892bcc Fix small test failure
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2056 f882894a-f735-0410-b71e-b25c423dba1c
2008-09-25 08:04:42 +00:00
Ton Voon
3b4d0bb292 Fix HTTP::Daemon::VERSION to get a fixed header size for tests
(Sven Nierlein)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2048 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-25 18:39:27 +00:00
Ton Voon
bb5ce4be01 Updated with more tests re: multiple status codes (Sven Nierlein)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2047 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-25 13:26:11 +00:00
Holger Weiss
c349438e32 The "-e" option now accepts a comma-delimited list of expected status
lines (Sven Nierlein - 1894496).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2046 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-25 11:42:57 +00:00
Ton Voon
e61022df19 Added HTTP tests for status codes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2045 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-22 13:08:08 +00:00