matteocorti / check_ssl_cert

A shell script (that can be used as a Nagios/Icinga plugin) to check an SSL/TLS connection.
GNU General Public License v3.0
368 stars 132 forks source link

Broken Tests #369

Closed peternewman closed 2 years ago

peternewman commented 2 years ago

Describe the bug

Tests in https://github.com/matteocorti/check_ssl_cert/commit/68fbd442962d2134141c33fffe3283ad7ee333bf don't work:

2022-03-19T02:47:22.8357254Z testPrometheus
2022-03-19T02:47:23.3419424Z ./unit_tests.sh: 401: eval: assertContains: not found
2022-03-19T02:47:23.3419775Z ./unit_tests.sh: 402: eval: assertContains: not found
2022-03-19T02:47:23.3420078Z ./unit_tests.sh: 403: eval: assertContains: not found

They require shunit2 2.1.8: https://github.com/kward/shunit2/blob/master/doc/CHANGES-2.1.md#changes-with-218

Which isn't yet in the latest Ubuntu: https://packages.ubuntu.com/jammy/shunit2

Upstream issue raised here: https://github.com/kward/shunit2/issues/155

To Reproduce

Run tests with shunit2 2.1.7 or below: https://github.com/matteocorti/check_ssl_cert/runs/5583298905?check_suite_focus=true

Expected behavior

Tests work

System (please complete the following information):

GitHub Actions

peternewman commented 2 years ago

Obviously this new version is unlikely to ever be backported to 16.04 etc...

williamdes commented 2 years ago

Let me know what you need I will see if I can do something I asked to take over the package maintenance

matteocorti commented 2 years ago

The tests are failing without consequences (no global fail). I would leave like that ...

matteocorti commented 2 years ago

I rewrote the tests using a grep so that it works even with older versions

peternewman commented 2 years ago

The tests are failing without consequences (no global fail). I would leave like that ...

I was just a bit worried it goes from not running silently to actually failing (i.e. the test no longer passes on systems running the newest version).

I rewrote the tests using a grep so that it works even with older versions

Amazing, that seems like the perfect outcome!