Commit graph

218 commits

Author SHA1 Message Date
RincewindsHat
ad45727dbe
Merge pull request #1688 from bazzisoft/master
check_curl.c: bugfix: verify certificates option should not force SSL to be used
2021-11-17 17:57:00 +01:00
RincewindsHat
726a29a3ac Fix some tests 2021-10-26 17:07:09 +02:00
Harald Jenny
e79ada81a6 Update check_load.t
adjust tests for new plugin output
2021-10-25 16:28:15 +02:00
RincewindsHat
280ae58ed8 Remove spaces from tests 2021-09-26 00:34:44 +02:00
Jonny007-MKD
cfc43a3275 Improvements suggested by tobiaswiese 2021-09-02 09:56:39 +02:00
Jonny007-MKD
70f55ca9db check_dns: add --expect-nxdomain 2021-09-02 09:56:39 +02:00
Barak Shohat
63cb7ecfcf check_curl.c: bugfix: verify certificates option should not force SSL to be used 2021-05-24 14:53:58 +03:00
Jacob Hansen
0bbcb60f02
Refactor check_fping
* Set correct amount of tests based on conditionals.
* When running the test as non-root, we would previously check is the
setuid bit is set. This doesn't seem to be needed, so just check if the
binary is executable for the user running the test.
* Use cmp_ok to check if tests succeeds rather than couting.

Signed-off-by: Jacob Hansen <jhansen@op5.com>
2021-05-19 13:36:04 +02:00
Jacob Hansen
ae2fe683e3
check_curl.t: Adjust test to use -f curl
It appears that `-f follow` doesn't work correctly in `check_curl` at
the moment. Test adjusted to use `-f curl` instead.

Issue for the above created: https://github.com/monitoring-plugins/monitoring-plugins/issues/1685

Signed-off-by: Jacob Hansen <jhansen@op5.com>
2021-05-18 15:19:43 +02:00
Aksel Sjögren
5ab03a7095
Fix conditional tests for check_http, check_curl
Set correct number of tests in skip- blocks to avoid the error "Bad
plan.  You planned 50 tests but ran 55" when run with/without
/usr/bin/faketime and NP_INTERNET_ACCESS=yes/no.
2021-04-30 11:13:59 +02:00
Sven Nierlein
fc71e3f930 migrate travis ci to github actions 2021-04-30 09:56:52 +02:00
Sven Nierlein
444a3579b2 fix fping test
in case of dns errors, fping returns an unknown and thats ok.
2021-04-30 09:56:52 +02:00
Sven Nierlein
f6fd14e886
Merge pull request #1669 from bazzisoft/verify-cert
Add an option to check_curl to verify the peer certificate & host using the system CA's
2021-04-07 17:51:38 +02:00
Barak Shohat
6993c21695 Add an option to check_curl to verify the peer certificate & host using the system CA's 2021-04-07 15:38:47 +03:00
Barak Shohat
2482950e26 Updated check_curl.c to display a specific human-readable error message where possible 2021-04-07 12:36:55 +03:00
Sven Nierlein
7d2582deb3 update test parameter according to check_http 2020-05-18 14:08:27 +02:00
Andreas Baumann
2f4d6764d7 Merge branch 'master' into feature_check_curl 2019-04-04 13:09:15 +02:00
Jan Wagner
2dcfbbcad0 travis-ci: Use RSA keys for SSH tests 2019-02-04 14:24:29 +01:00
Sven Nierlein
d7dcca22ae tests: rework test parameters
there were 2 variants of calling getTestParameter:

    - parameter, description, default value
    - parameter, env value, default value, description, scope

While scope was never actually used and having 2 names for the same value led
to having 2 different entries in the cache file for the same configuration.

This commit removes the variants and simplifies tests parameters by only using
the first 3 parameter variant.
2018-12-04 15:20:19 +01:00
Markus Frosch
198611a3c2 test: Add proxy tests via proxy
On Travis with a local squid
2018-11-06 12:33:24 +01:00
Sven Nierlein
70d36a729e check_curl: rewrite connect_to / host headers
since CURLOPT_CONNECT_TO is only available in later curl versions, we do it the other way round now and
set the url from the address we want to connect to and then set the host header accordingly.
2018-10-25 10:35:06 +02:00
Andreas Baumann
bbec77c7ec made check_curl tests copies of check_http tests because they will differ slightly 2018-10-22 16:30:31 +02:00
Sven Nierlein
e9239b556a check_curl: make check_curl use the same tests as check_http 2018-10-22 16:30:31 +02:00
Sven Nierlein
afa52eb834 add check_curl test
just a copy of check_http for now...

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2018-10-22 16:28:51 +02:00
Sven Nierlein
77aa6d4ebf udp test: prefer nc over netcat syntax
sles 12 systems have netcat symlinked to nc and so expect nc syntax for netcat.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12 22:55:52 +01:00
Sven Nierlein
e90c63712e check_disk test: increase assumed thresholds
The check_disk fails if the build system has more than 100GB of free disk
space. Lets make this 100TB and we are safe for a couple more years.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12 22:55:52 +01:00
Sven Nierlein
0cff5f2d93 remove hardcoded verisign.com tests
and make it configurable

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12 22:55:52 +01:00
Sven Nierlein
b3dee5c4bf make snmp tests more reliable
snmp tests fail if the snmp daemon runs systemd, then the process with 1 has arguments. Convert
the test into a regex which works for sysv and systemd.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2017-03-12 22:55:52 +01:00
Jan Wagner
3fc149f499 Merge remote-tracking branch 'upstream/pr/1457' 2017-01-04 14:53:16 +01:00
Christian Schmidt
bf18dc42dd Add --only-critical switch to check_apt 2016-12-31 12:00:46 +01:00
Nicolai
6a0f4fe275 check_dns: Small test cleanup 2016-12-23 22:59:42 +01:00
Nicolai
b9f00386a1 check_dns: Fix travis tests
(or try to fix it...)
2016-12-23 21:04:36 +01:00
Nicolai
ea756ac4ad check_dns: Tests and info 2016-12-23 20:44:45 +01:00
Jan Wagner
6d0c111631 Creating and mounting randisk to make use of check_disk tests 2016-11-20 20:38:41 +01:00
Sven Nierlein
9e02d0c3e6 check_http: add host header tests
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-11 10:32:19 +01:00
Sven Nierlein
85cfc7b1aa tests: enable snmp tests
Enabled snmp tests against snmpd on localhost. It was installed already
in the travis file, we just need to enable the tests by setting the
parameters in the answers file.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-08 00:50:03 +01:00
Sven Nierlein
b838b75366 check_snmp: fix number of tests skiped 2016-11-08 00:38:55 +01:00
Sven Nierlein
1d4874240a check_snmp: add testcase for no datatype
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-08 00:29:42 +01:00
Sven Nierlein
948db2e3a2 tests: adjust check_http to new output format
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07 22:46:06 +01:00
Sven Nierlein
aa7ed88c54 check_users: add new test cases
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2016-11-07 21:49:40 +01:00
Holger Weiss
0960239981 Let check_http test use HTTP/1.1 2016-02-22 21:59:58 +01:00
Holger Weiss
37928b52a5 Merge branch 'maint'
* maint:
  sslutils: Remove superfluous parenthesis for sslv3 function too
  sslutils: remove superfluous parenthesis
  check_snmp: modified tests
  check_snmp.c: switched DEFAULT_TIMEOUT to DEFAULT_SOCKET_TIMEOUT (provided by utils.h), already used by help description, see issue #1318
  install snmpd on travis tests
  enable libtab on travis builds
  add perl snmp to travis dependencies
  NEWS: Mention check_ups performance data fix
  Fix incorrect performance data thresholds
  check_dhcp: Fix option parsing
  Fixes segfaults when running via monitoring worker (off-by-one)
  travis: fix http test host
  sslutils: Check if OpenSSL supports SSLv3.

Conflicts:
	NEWS
	plugins/sslutils.c
2015-10-08 12:52:10 +02:00
Oliver Skibbe
2d677b19ed check_snmp: modified tests
(Closes #1325)
2015-10-04 13:40:04 +02:00
Sven Nierlein
1784b0ac0c add faketime based tests for check_http 2015-10-02 15:56:19 +02:00
Sven Nierlein
1c0ec88152 travis: fix http test host
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-02 10:30:01 +02:00
Sven Nierlein
d73c57aa06 travis: fix http test host
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-01 17:05:47 +02:00
Sven Nierlein
82e28411c8 check_ldap: fix number of skipable tests
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2015-04-23 09:51:26 +02:00
Sven Nierlein
d309b1d2e9 add check_ldap test
install openldap on travis and grep base dn from slapcat.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-04-22 12:51:29 +02:00
Sven Nierlein
8e8d2d4243 tests: negate test fails when not run from plugins folder
Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-31 14:56:16 +02:00
Sven Nierlein
559d11b1fb tests: get current directory the perl way
instead of hoping to have it in the environment. This at
least broke tests on solaris.

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
2014-07-31 13:47:19 +02:00