Roger A. Light
94b366b5e7
Start of message sequence "fuzzish" tests for library
3 years ago
Roger A. Light
3a9441122c
Code for replaying failed sequence tests to make debugging easier
3 years ago
Roger A. Light
1f0d7a8064
Per group global test settings
3 years ago
Roger A. Light
5c0cfade12
Add http origin checking to built in websockets.
3 years ago
Roger A. Light
1e0a07ba5a
Add missing int to string conversions.
3 years ago
Roger A. Light
ba665a3477
Unsubscribe-v5 test should use properties
3 years ago
Roger A. Light
99c49d3d39
Remove duplicate tests.
3 years ago
Roger A. Light
b6de597127
subscribe_simple helper test
3 years ago
Roger A. Light
529cd609ba
Test improvements.
3 years ago
Roger A. Light
3d5309a622
Complicated config test.
3 years ago
Roger A. Light
06f4b09ae3
Test fixes and bridge leak fixes.
3 years ago
Roger A. Light
c1edce8df8
Plugin loading.
3 years ago
Roger A. Light
e123f661c8
Enable client websocket tests
3 years ago
Roger A. Light
b49631df23
Add mosquitto_passwd tests
3 years ago
Roger A. Light
9cc5d1d6ff
Add mosquitto_ctrl tests
3 years ago
Roger A. Light
86f3a6b484
Extend db_dump tests, and fix minor bugs.
3 years ago
Roger A. Light
b873e1d5d6
Fix some retained topic memory not being cleared immediately after used.
3 years ago
Roger A. Light
8a6bb872fe
Invalid/unsupported plugin tests.
3 years ago
Roger A. Light
907b754566
Add test for MOSQ_EVT_PSK_KEY
3 years ago
Roger A. Light
6823e721e7
Factor out some test boilerplate
3 years ago
Roger A. Light
fa08918b48
Don't recompile objects for tests (in Makefile tests)
3 years ago
Roger A. Light
27c99bc7e7
Add db_dump test to verify current broker output.
3 years ago
Roger A. Light
6b1b0bf7bc
Start of db_dump tests.
3 years ago
Roger A. Light
e49f741cd2
Individual basic WS tests for clients
3 years ago
Roger A. Light
514f8dc89a
Extend protocol edge-case test suite.
3 years ago
Roger A. Light
a2e5bb5294
Merge branch 'fix-compiler-warnings' of https://github.com/buschulte/mosquitto into buschulte-fix-compiler-warnings
3 years ago
Roger A. Light
65a6191202
Set mosquitto_read_*() values to NULL when empty
...
`mosquitto_property_read_binary/string/string_pair` will now set the
name/value parameter to NULL if the binary/string is empty. This aligns the
behaviour with other property functions.
Closes #2648 . Thanks to Alexander Fiebig.
3 years ago
Kai Buschulte
e6f5633ff6
Fix some compiler warnings
...
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Norbert Heusser
f0300087f6
Added new test for broker missing config file and extend tests for config errors
...
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
3 years ago
Roger A. Light
59ec303372
Fix Coverity Scan 1499851
3 years ago
Roger A. Light
edfb2278f8
Fix CMake test build
3 years ago
Roger A. Light
c43099f98c
Fix Coverity Scan 1499822
3 years ago
Roger A. Light
3df0179c01
Fix Coverity Scan 1499800
3 years ago
Roger A. Light
9aeb756dac
Fix Coverity Scan 1499842
3 years ago
Roger A. Light
07c7755f81
Fix Coverity Scan 1499806
3 years ago
Roger A. Light
10b9452c6c
Fix Coverity Scan 1499821
3 years ago
Roger A. Light
5b44035eba
Fix Coverity Scan 1499798, 1499803, 1499813.
3 years ago
Roger A. Light
3250d20fc8
Fix Coverity Scan 1499800
3 years ago
Roger A. Light
a000ca2b60
Fix test leak
3 years ago
Roger A. Light
3544d935e0
Fix various Coverity Scan issues.
3 years ago
Roger A. Light
44cf973abb
Fix Coverity Scan 982726
3 years ago
Roger A. Light
52da5c0b78
Fix Coverity Scan 1499829, double free.
3 years ago
Roger A. Light
f0d7c27a67
Add tests to coverity scan
3 years ago
Roger A. Light
9d3f19b3bb
Test tidy
3 years ago
Roger A. Light
74ef9eec4c
Don't use deprecated wrap_socket.
3 years ago
Roger A. Light
ad8a841a4a
More robust SSL test.
3 years ago
Roger A. Light
7fb760ef27
Split config parse tests by tls/not.
3 years ago
Roger A. Light
d8bdc17a39
Fix slightly flaky test.
3 years ago
Roger A. Light
f2524ee413
Mark unused parameters
3 years ago
Roger A. Light
01dfb6fea1
Persist: Improve tests
3 years ago
Roger A. Light
16feb14a57
Persistence interface updates and sqlite plugin fixes
...
The MOSQ_EVT_PERSIST_CLIENT_MSG_CLEAR event has been removed, due to
never being called. It is the responsibility of the plugin to remove
client subscriptions and client messages when the client is removed.
Lots of persist test improvements and additions - mostly checking item
counts.
3 years ago
Roger A. Light
ef078b31b5
Make persistence tests easier to use for other plugins.
3 years ago
Roger A. Light
afc575aa1c
Simplify function calls.
3 years ago
Roger A. Light
1d230bd255
dynsec: Fix listClients/getClient crashing if an anon user present
...
This only affects the unreleased `develop` branch.
3 years ago
Roger A. Light
4997b40259
Report persistence stats when starting.
3 years ago
Roger A. Light
7ec8417e54
Client tests: --version dummy, and float printing for sub.
3 years ago
Roger A. Light
3b56a89b0a
Improved client tests
3 years ago
Roger A. Light
3c4d2d0772
Fix persisted clients being restored without a session expiry time.
3 years ago
Roger A. Light
9ab0bc3cbe
Build auth_plugin_v5_handle_tick plugin for cmake tests
3 years ago
Roger A. Light
fd68bf00c7
Merge branch 'master' into develop
3 years ago
Roger A. Light
ba13edc6a4
dynsec: Forbid deleting the anon group.
3 years ago
Roger A. Light
4d1b587e29
dynsec: Forbid deleting the anon group.
3 years ago
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
Roger A. Light
351911bd8f
Fix incorrect return code being sent in DISCONNECT.
...
This is for when a client session is taken over.
Closes #2607 . Thanks to der-b
3 years ago
Norbert Heusser
f2c59e4048
Split client python tests into test with/without TLS/PSK
...
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
3 years ago
Roger A. Light
570d54e4e8
Fix tests on when running under valgrind
3 years ago
Roger A. Light
9b04d0dd36
dynsec: Add roles to group test.
3 years ago
Roger A. Light
684c99261a
argv tests for mosquitto_rr
3 years ago
Roger Light
ac98c2135f
Merge pull request #2529 from NorbertHeusser/develop
...
Create github actions to trigger build and tests on devevlop branch
3 years ago
Roger A. Light
ca61baf5e3
Merge branch 'add-common-options-target-to-enable-compiler-warnings' of https://github.com/buschulte/mosquitto into buschulte-add-common-options-target-to-enable-compiler-warnings
3 years ago
Norbert Heusser
f424667fca
Merge branch 'develop' into NorbertHeusser:develop
3 years ago
Kai Buschulte
71456077ad
Introduce a common-options cmake target
...
this makes it possible to explicitly share compile options, without
using the `add_definition` function. This function declares options for
the current directory and below (in our case also for `deps`).
Adding -Wall, -Wconversion and -Wextra to at least make compiler
warnings visible for the cmake build.
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Kai Buschulte
f486b45619
CMake: introduce a coverage target
...
to produce coverage information while running the tests, call cmake with
the following options:
cmake -DCMAKE_C_FLAGS=-coverage -DCMAKE_CXX_FLAGS=-coverage <build-dir>
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
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>
3 years ago
Kai Buschulte
0fe397603b
Workaround problem with sqlite3-wal files
...
These files are not removed but empty for some versions of sqlite3
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Kai Buschulte
4eadc96bcb
Add Traceback to failing packet_match
...
This helps finding the caller/cause of the failure
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Norbert Heusser
71e1b92564
Fixed race condition in test/broker/11-persistent-subscription-no-local.py
3 years ago
Roger Light
6c1bb33e86
Merge pull request #2573 from buschulte/throw-broken-pipe-error-when-loosing-connection
...
throw BrokenPipeError if nothing received on socket
3 years ago
Roger A. Light
34391080d6
Add dynsec init by simple file.
3 years ago
Kai Buschulte
a7304083f8
throw BrokenPipeError if nothing received on sock
...
instead of ignoring this error, we throw an exception
the previous way might cause hard to find issues
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Roger A. Light
3e1cf8a80b
Fix tests build.
3 years ago
Roger A. Light
09ac578459
Fix unused flags in CONNECT command being forced to be 0 in MQTT v3.1
...
This check is not required until v3.1.1.
Closes #2522 . Thanks to garinocyr
3 years ago
Norbert Heusser
6fbf6fc5cb
Merge branch 'eclipse:develop' into develop
3 years ago
Roger A. Light
4487b98dbb
Fix clean
3 years ago
Norbert Heusser
6150ae6560
Remove mosquitto__set_state after error from send__connect in mosquitto__reconnect to
...
fix failing test test/lib/02-subscribe-qos1.py $@/02-subscribe-qos1-async2.test
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
3 years ago
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>
3 years ago
Roger A. Light
4fd51e9681
Fix incorrect earlier commit
3 years ago
Roger A. Light
4c72542eae
Move mosquittopp header to include dir.
4 years ago
Roger A. Light
8a9d8ece37
Fix sqlite test
4 years ago
Roger A. Light
0433b8ee9b
Update changelog, fix usage of m_set_clientid(), add test.
4 years ago
Roger A. Light
b4a0255f1c
Process retain persist events only every 10 seconds.
4 years ago
Roger A. Light
1bb16a68dc
Test fixes for running under valgrind
4 years ago
Roger A. Light
cbb01193a0
Rename persist retain_add to retain_set
4 years ago
Roger A. Light
2d3b152a22
Rename of mosquitto_msg_store struct.
...
struct mosquitto_msg_store -> struct mosquitto_base_msg
This is the base message which client messages and retained messages
refer to. The base messages are still held in the message store.
This change comes about because the persistence interface exposes these
message types. Prior to this commit the different messages were "msg",
"client_msg", and "retain". After this commit there is "base_msg",
"client_msg", and and "retain_msg" in the persist interface.
4 years ago
Roger A. Light
41b1b0c6d1
Merge branch 'XavierDooms-fix-support-tick-with-per-listener-settings' into fixes
4 years ago
Roger A. Light
62c0d0c9c8
Merge branch 'fix-support-tick-with-per-listener-settings' of https://github.com/XavierDooms/mosquitto into XavierDooms-fix-support-tick-with-per-listener-settings
4 years ago
Norbert Heusser
e7e8b6e832
* Added list of connections to dynsec/getClient response
...
* Added new helper function mosquitto_apply_on_all_clients to broker
* Refactoring in dynamic-security plugin
Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
4 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
3bb8be6ea2
Client tests should not run in parallel.
4 years ago