Commit graph

24 commits

Author SHA1 Message Date
Roger A. Light
568c527ebd
Test refactor: First swath of write_config() replacements 2026-05-13 19:38:00 +01:00
Roger A. Light
e6e55d662c
Tests: Refactor test packet generation 2026-05-13 19:38:00 +01:00
Roger A. Light
87c5cb13c5 Tests: Add support for broker shutdown on Windows 2026-05-03 01:17:26 +01:00
Roger A. Light
f6f5de34d6 Tests: Use tempfile for broker logging to prevent stderr buffer filling 2026-05-03 01:17:26 +01:00
Roger A. Light
25e4c7a0ba Test fixes for WITH_TLS=OFF 2026-04-16 21:35:46 +01:00
Roger A. Light
3d0e96be85 Merge branch 'master' into develop 2025-07-29 16:07:57 +01:00
Roger A. Light
fd68bf00c7 Merge branch 'master' into develop 2022-08-17 16:18:24 +01:00
Norbert Heusser
f424667fca Merge branch 'develop' into NorbertHeusser:develop 2022-07-08 09:30:53 +00:00
Kai Buschulte
a883bda9c1 Add CMake test target
Use `ctest` or `make test` to run all tests.
With this it's also possible to run tests on a Mac.

Relative paths used in tests become absolute ones to make tests
executable from any build folder.

Also fixed race condition in
  test/broker/11-persistent-subscription-no-local.py

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-06-22 23:56:50 +01:00
Norbert Heusser
306b76d7f6 Create github build action to build Mosquitto and added timeout
to python tests waiting for subprocess to avoid github actione being blocked

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
2022-05-08 10:40:30 +00:00
Olivier Gayot
b7fb911428 tests: replace use of ssl.wrap_socket that throws warnings in Python 3.10
The function ssl.wrap_socket() is deprecated starting Python 3.7 because
it does not support hostname matching (which is considered insecure). In
Python 3.10, the function now throws warnings at runtime, which makes
Ubuntu / Debian autopkgtest fail.

The function ssl.SSLContext.wrap_socket comes in as the replacement and
has support for SNI and hostname matching.

Replaced all uses of ssl.wrap_socket() by equivalent using
ssl.SSLContext.wrap_socket().

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
2022-02-15 09:23:06 +01:00
Roger A. Light
93ed5721e2 No need to set keepalive in most tests. 2021-12-30 08:35:45 +00:00
Roger A. Light
8cd2411ab6 Tests should typically use listener instead of port. 2021-07-28 14:20:01 +01:00
Roger A. Light
69f84bbca9 Simplify "expect_packet" tests. 2020-08-12 15:18:18 +01:00
Roger A. Light
636d0f1f74 Fix printing on broker tests. 2019-04-02 14:06:28 +01:00
Roger A. Light
7e49d91898 Convert tests to Python 3 2019-03-28 21:32:12 +00:00
Roger A. Light
34e7da426c Use test helper for importing modules. 2018-11-27 11:26:21 +00:00
Roger A. Light
9fd55c0d44 Simplify broker tests with helper function. 2018-08-01 22:51:19 +01:00
Roger A. Light
5d2f5c25d7 Experimental parallel testing for broker. 2018-04-15 23:38:18 +01:00
Roger A. Light
51aa7b7121 Update tests as a step towards parallelism. 2018-04-13 22:04:40 +01:00
Roger A. Light
07b21f0fe5 Fix minor test problems highlighted by codacy.com. 2016-04-09 22:18:11 +01:00
Roger A. Light
15efd2d072 Various memory fixes. 2014-06-28 01:38:58 +01:00
Roger A. Light
6427105bf6 Tests can now use valgrind. 2014-06-26 23:12:55 +01:00
Roger Light
0364bd1be7 Initial contribution. 2014-05-07 23:27:00 +01:00