summaryrefslogtreecommitdiffstats
path: root/plugins/tests
AgeCommit message (Collapse)AuthorFilesLines
2023-02-06check_http: Implement special case test for zero size chunk onlyrefs/pull/1840/headRincewindsHat1-1/+69
2023-01-07tests: fix chunked encoding test serverSven Nierlein2-20/+16
2023-01-07check_http/check_curl: add chunked encoding testSven Nierlein2-2/+34
2022-12-22check_snmp: always apply format when applying multiplierSven Nierlein1-1/+1
2022-12-22Improve tests for check_snmp & multiply optionRobert Bohne2-9/+19
2022-12-22add 'multiplier' to modify current valueWolfgang Nieder1-3/+9
2022-01-30sslutils: use chain from client certificatesTobias Wiese17-203/+537
sslutils used to load only the first certificate when it was given a client certificate file. Added tests for check_http to connect to a http server that expects a client certificate (simple and with chain). Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com>
2021-11-17Merge pull request #1654 from wolfgangkarall/masterRincewindsHat1-1/+1
check_procs -- exchange needle and haystack in strstr() for proper st…
2021-11-17check_snmp: fix performance thresholds when using multiple oidsSven Nierlein1-3/+14
when using check_snmp with multiple oids it simply printed the unparsed content from -w/-c into the thresholds for each oid. So each oid contained the hole -w from all oids. ./check_snmp ... -o iso.3.6.1.2.1.25.1.3.0,iso.3.6.1.2.1.25.1.5.0 -w '1,2' -c '3,4' before: SNMP ... | HOST-RESOURCES-MIB::hrSystemInitialLoadDevice.0=393216;1,2;3,4 HOST-RESOURCES-MIB::hrSystemNumUsers.0=24;1,2;3,4 after: SNMP ... | HOST-RESOURCES-MIB::hrSystemInitialLoadDevice.0=393216;1;3 HOST-RESOURCES-MIB::hrSystemNumUsers.0=24;2;4 This also applies to fixed thresholds since check_snmp translates negative infinities from: '~:-1' to '@-1:~'
2021-11-01check_procs: add test for elapsed timeSven Nierlein2-2/+230
2021-11-01remove unused test fileSven Nierlein1-84/+0
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2021-11-01check_procs: improve ps args autodetectionSven Nierlein1-4/+7
one of the first ps commands in the configure.ac is `axwo 'stat comm vsz rss user uid pid ppid args'` which works on most modern linux systems (checked debian 10/11 and centos 7/8). But this test misses the etime argument. Therefore `check_procs --metric=ELAPSED` does not work. To fix this, we simply do the same test including etime before that one. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2021-05-20tests: ignore sigpipes in https test daemonrefs/pull/1686/headSven Nierlein1-4/+8
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-20tests: increase startup sleepSven Nierlein2-4/+6
github action might fail from to time otherwise
2021-03-11fix check_curl crash if http header contains leading spacesrefs/pull/1666/headSven Nierlein1-3/+13
check_curl crashes when a (broken) http server returns invalid http header with leading spaces or double colons. This PR adds a fix and a test case for this. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2021-01-03check_procs -- update test data toorefs/pull/1654/headWolfgang Karall-Ahlborn1-1/+1
2020-05-15merge test changes from check_httpSven Nierlein1-10/+11
the example certificate has changed since.
2020-05-15tests: update expired test certificateSven Nierlein3-35/+53
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.
2019-04-04Merge branch 'master' into feature_check_curlAndreas Baumann4-94/+116
2019-02-19renew test certificatesrefs/pull/1585/headSven Nierlein3-42/+58
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2019-01-21tests: make check_snmp test more reliablerefs/pull/1578/headSven Nierlein1-52/+58
The check_snmp rate tests depend on the exact amount of time spend between the plugin runs and will fail on busy machines, ex. the ci servers. Using faketime mitigates this issue and also removes all the sleeps. Signed-off-by: Sven Nierlein <sven@nierlein.de>
2018-10-22added some advanced tests for check_curlChristopher Odenbach1-19/+61
2018-10-22synched tests/check_http.t test changes (virtualhost) into tests/check_curl.tAndreas Baumann1-2/+39
2018-10-22fixed test outputs for status line checksAndreas Baumann1-4/+4
handling empty data in POST and PUT handling data upload (from -P <postdata>) also in PUT
2018-10-22made check_curl tests copies of check_http tests because they will differ ↵Andreas Baumann1-1/+418
slightly
2018-10-22check_curl: make check_curl use the same tests as check_httpSven Nierlein2-3/+7
2017-03-26Added tests for virtual port behaviour. Separated from all other tests this ↵refs/pull/1474/headChristopher Odenbach1-2/+39
time.
2016-11-11Revert "adopt http test to changed ssl expire date output"Sven Nierlein1-4/+4
This reverts commit 6cd50bc42cb4b25a3c0f7153df7f83b7262f404b.
2016-11-11tests: make tests reliable for forcing the locale to CSven Nierlein1-0/+2
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11adopt http test to changed ssl expire date outputSven Nierlein1-4/+4
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07GMT expiry displayPeter (pir) Radcliffe1-4/+4
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-07Revert "Fix check_http test time output"Peter (pir) Radcliffe1-4/+4
This reverts commit 2d9e61a4382b8366331cde7617dbc4e381a0219a.
2016-11-07Fix check_http test time outputPeter (pir) Radcliffe1-4/+4
Tests need to match new output time and timezone.
2015-10-02fix tests for certificates expire date with secondsSven Nierlein1-4/+4
2015-04-12fix snmp test for included thresholdSven Nierlein1-11/+11
since 6623a1 check_snmp prints the thresholds along the performance data. This adjust our test cases accordingly. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-31tests: skip extented snmp tests if snmpd has no perl supportSven Nierlein1-1/+10
solaris snmpd has no perl support by default, so this test will fail. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-21plugins/tests/check_http.t: Adjust date stringsHolger Weiss1-4/+4
Adjust the expected date strings to the now-localized output produced by plugins/sslutils.c. Closes #1275.
2014-06-13tests: freebsds snmpd does not use quotesSven Nierlein1-1/+1
when returning syscontact. So make them optional since we want to test check_snmp and not the snmpd. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-13tests: check_proc tests fail if uid -2 does not map to nobodySven Nierlein1-0/+1
so make sure our tests only run if -2 maps to nobody Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-13require at least HTTP::Daemon 6.01Sven Nierlein1-1/+2
since the test uses send_header from HTTP::Daemon::ClientConn which has been introduced in HTTP::Daemon 6.01
2014-06-12tests: testCmd has own timeout which overwrites local oneSven Nierlein1-15/+9
so add configurable/optional timeout to testCmd. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-06-12tests: parts of the check_procs test only work when uid -2 existsSven Nierlein1-12/+16
skip those tests if the uid does not exist Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-02-18check_procs test fails if there is no user with uid 501Sven Nierlein1-9/+17
thats because check_procs verifys there is a user for a given uid filter. So even we use sample data for this test, we still need a real user. Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-01-31Add perfdata in check_proc output testsThomas Guyot-Sionnest1-15/+15
2014-01-31Fix snmpd testsThomas Guyot-Sionnest1-1/+1
2014-01-31Enable tests in tests/ subdirsThomas Guyot-Sionnest1-0/+0
2014-01-31Add tests for negative thresholds in check_snmpThomas Guyot-Sionnest2-8/+36
Next commit will work on fixing these!
2014-01-27Rename MP_STATE_DIRECTORY to MP_STATE_PATHThomas Guyot-Sionnest1-2/+2
2014-01-25Rename ENV variable, keep backward compatibilityThomas Guyot-Sionnest1-2/+2
Rename NAGIOS_PLUGIN_STATE_DIRECTORY to MP_STATE_DIRECTORY
2014-01-21New default installation prefix: /usr/localHolger Weiss1-1/+1
Install into /usr/local instead of /usr/local/nagios by default, in order to comply with the Filesystem Hierarchy Standard (FHS) and presumably the expectations of most users.