Commit Graph

70 Commits (e9b2fddaa5dd05fe80f51e7e7f3314149ce06632)

Author SHA1 Message Date
Roger A. Light 5d18962486 Improve custom SSL_CTX tests.
Issue #2463.
3 years ago
Roger A. Light 02b92b97ef Fix use of MOSQ_OPT_SSL_CTX when used with MOSQ_OPT_SSL_CTX_DEFAULTS
Closes #2463. Thanks to Tim Nordell.
3 years ago
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>
4 years ago
Roger A. Light a1a190b482 Pointless whitespace tidy. 4 years ago
Roger A. Light ed28c416e9 Null checks in client tests. 5 years ago
Roger A. Light 4ae8971ce1 The broker now sends the receive-maximum property for MQTT v5 CONNACKs. 5 years ago
Roger A. Light 79028bcb14 Fix duplicate frees in tests. 5 years ago
Roger A. Light a65f946e83 Move headers to own directory. 5 years ago
Roger A. Light c90e49af1b Merge remote-tracking branch 'origin/fixes' into develop 5 years ago
Roger A. Light 69f84bbca9 Simplify "expect_packet" tests. 5 years ago
Roger A. Light ba2c00137d Fix client test leaks. 5 years ago
Roger A. Light c343812c42 Improve client test for unexpected pubrel. 5 years ago
Roger A. Light b2e72a7e7c Fix memory leaks only in tests. 5 years ago
Roger A. Light 904284595f Add missing test file. 6 years ago
Roger A. Light 21f203b91a Don't treact unexpected PUBACK/COMP as fatal. 6 years ago
Roger A. Light a16d7e0661 iDon't treat an unexpected PUBREL as fatal.
Issue #1629. Thanks to radcrabs.
6 years ago
Roger A. Light 17db97584e Fix client keepalive test using too low keepalive. 6 years ago
Roger A. Light aceabcdef2 Tidy up async test outputs. 6 years ago
Roger A. Light 093c8f90f5 Fix publish props not being passed to v5 msg callback for QoS 2 msgs.
Closes #1432. Thanks to Magnus Galåen.
6 years ago
Roger A. Light 1a8c44b84f Fix regression on use of `mosquitto_connect_async()` not working.
Closes #1415 and #1422. Thanks to Karl Palsson, Till Zimmermann and Liam Fry.
6 years ago
Roger A. Light d6c7923d16 Add `make check` and document testing procedure.
Also support test target in cmake.
7 years ago
Roger A. Light 689989cc56 Fix inflight quota inc/dec for both broker and library. 7 years ago
Roger A. Light 7e49d91898 Convert tests to Python 3 7 years ago
Roger A. Light 5f0cb3a44c Possible fix for errant test. 7 years ago
Roger A. Light 7b002abd7e Sort tests. 7 years ago
Roger A. Light 36f10c7623 Update tests to not use TLS 1.0. 7 years ago
Roger A. Light 571c643b3d More C90 fixes for travis. 7 years ago
Roger A. Light b9b8e0ff2a Add client support for outgoing maximum packet size. 7 years ago
Roger A. Light 66c1e2ccf0 Add mosquitto_unsubscribe_multiple(), plus tests. 7 years ago
Roger A. Light c823073be6 v5 unsubscribe test, single topic. 7 years ago
Roger A. Light baa4642bd3 Generic ptest implementation. 7 years ago
Roger A. Light 1cc3e558ee Test for server keepalive. 7 years ago
Roger Light 4b97a90ef9 Tests and fixes for truncated PUB* packets
For the cases where reason_code is 0, or properties are missing.
7 years ago
Roger A. Light 326292681a Add maximum-qos support to broker and client.
This comes in the form of:

* Per listener maximum_qos option, which can be in the range 0-2.
* Changes to mosquitto_publish*() to return MOSQ_ERR_QOS_NOT_SUPPORTED
  if attempting to publish with a higher QoS than supported.
* Bridges will downgrade messages to match the maximum QoS.

More tests on the broker side (specifically bridges) are required. This
needs bridge support for MQTT 5 first.
7 years ago
Roger Light 930a314caf Add reason_code to on_publish_v5 callback. 7 years ago
Roger Light 740a128769 Support PUBREC reason code >=0x80 as partial qos2 flow. 7 years ago
Roger Light 6119f83571 Add receive-maximum=1 test for client. 7 years ago
Roger A. Light aeba5b5d0d Fix and tests for client side receive-maximum. 7 years ago
Roger Light 9aec82b0e1 Finalise test proplists in the packet gen funcs.
This makes it easier to add part of a proplist in the test itself, and have the gen func add some more.
7 years ago
Roger A. Light 4fe75b1af0 Make user functions for reading properties easier to use. 7 years ago
Roger A. Light f01042fb97 Simplify test makefiles. 7 years ago
Roger A. Light 085fdf3593 Add tests for Content Type property sending. 7 years ago
Roger A. Light 34e7da426c Use test helper for importing modules. 7 years ago
Roger A. Light 0123ff1efe Rename *_with_properties() -> *_v5(). 7 years ago
Roger A. Light 29cf4266d9 Remove old tests from ptest.py. 7 years ago
Roger A. Light bb745b3308 Client prop test for format-payload-indicator. 7 years ago
Roger A. Light 22f284671d Request-response test with/without correlation data 7 years ago
Roger A. Light 6609bbac10 Move topic matching tests to unit tests. Needs improving. 7 years ago
Roger A. Light 34c8c28e9d Remove old UTF-8 tests. 7 years ago
Roger A. Light ba71bc3b32 Experimental parallel testing for library. 8 years ago