41d0725ebf
Fix for #217
...
The cron scheduler has been made more robust against changes in the
system clock (caused by e.g. DST changes, NTP syncs or manual setting).
A more granular management for cronjob events has been introduced, now
supporting a `TIME_SYNC` event besides the usual `STOP`. When the cron
scheduler detects a system clock drift (i.e. the timestamp offset before
and after a blocking wait is >1 sec) then all the cronjobs are notified
and forced to refresh their state.
2022-04-28 00:57:49 +02:00
eae4b4f62a
The tmp_file fixture destructor should clean up any temporary files (in case multiple tests import it)
2021-03-09 00:22:18 +01:00
296458ece3
Cron expressions should follow the machine local time, not UTC [ closes #173 ]
2021-03-09 00:18:33 +01:00
c659ec507f
Added tests/__main__.py entry point to run all the tests
2021-03-06 20:13:38 +01:00
34a108bbcb
Clear log objects on teardown to prevent pytest logging errors
2021-03-06 20:02:25 +01:00
090e7d6de8
Support for specifying the application Redis queue from the command line or service constructor
2021-03-06 19:22:13 +01:00
6f85318868
Use another Redis queue for the test app to prevent clashes with another Platypush service running on the same machine
2021-03-06 17:17:55 +01:00
8f256e4077
Check for file creation and content multiple times with timeout
2021-03-06 17:09:40 +01:00
4ed80a0945
More tests improvements
2021-03-06 17:03:50 +01:00
ca90060ba1
Tests improvements
2021-03-06 16:25:37 +01:00
49ad3261f1
Refactored tests to use pytest with fixtures instead of unittest.TestCase
2021-03-06 16:21:28 +01:00
66445cb4e4
- Do not parse Zeroconf info at all if not available
...
- Temporarily skip test_procedure until I find a proper way to clean up the status from the previous run and start a fresh platform
2021-02-27 21:11:37 +01:00
0d806eeb6e
- Removed setUp method from test_event_parse - let the parent setUp run and properly start the daemon
...
- More resilient logic in case some entries in the Zeroconf registry are still loading and the info object is still None
2021-02-27 20:51:48 +01:00
3932fb56c4
test_event_parse must include a config_file, even if it doesn't use it, otherwise the service will fail to start
2021-02-27 17:01:47 +01:00
b4f9472fc5
- Proper expansion of the context variables on functional procedure call
...
- Expanded and refactored tests framework
- Added test_procedure
2021-02-27 15:01:25 +01:00
531be19a66
.context needs to be imported in test_event_parse to make sure that the configuration is properly initialized
2021-02-24 00:35:41 +01:00
571a8ca9d1
Improvements on HTTP integration test. Plus, removed ApplicationStoppedEvent - it's unreliable and it could be delivered when the bus has already been stopped
2021-02-24 00:23:32 +01:00
Fabio Manganiello
e5c8adfc1b
Fixed and expanded integration tests to deal with HTTP user authentication
2020-12-16 02:10:37 +01:00
Fabio Manganiello
f5ef9957de
Increased daemon warm-up waiting time and timeout in tests
2019-07-15 16:28:44 +02:00
Fabio Manganiello
570ef6f109
Replaced EventAction with Procedure to allow more flexibility in event hooks and cronjobs
2018-09-27 01:52:35 +02:00
Fabio Manganiello
d215410a6a
More consistent flow for messages received by a backend
2018-09-24 23:13:44 +02:00
Fabio Manganiello
44962dd919
Removed timeout from get_plugin lock; Added Redis server to tests configuration
2018-09-20 10:59:18 +00:00
Fabio Manganiello
4ebdda80f9
More robust support for Redis configuration in web socket server
2018-07-08 12:24:33 +02:00
Fabio Manganiello
b3d82bf43e
Added Redis backend configuration to the test
2018-07-08 12:20:39 +02:00
Fabio Manganiello
75fac37984
Fixed tests
2018-01-29 16:34:00 +01:00
Fabio Manganiello
252f503e4d
Better management of the context and support for proper expression expansion from the context in the action execution through eval
2018-01-07 23:31:19 +01:00
Fabio Manganiello
301c356c33
Replaced the local fifo test with a test for the HTTP backend
2018-01-04 18:29:03 +01:00
Fabio Manganiello
6b58c96ebe
Added __init__ in tests
2018-01-04 10:42:32 +01:00
Fabio Manganiello
4c62133378
Updated README
2018-01-03 02:23:25 +01:00
Fabio Manganiello
691a9c8593
Added test for the event/condition matching and parsing logic
2018-01-03 00:16:01 +01:00
Fabio Manganiello
4a6accf483
s/push/send_request/g
2018-01-02 19:33:33 +01:00
Fabio Manganiello
6e019865bc
Placed a sleep to let all the messages be received before stopping everything (TODO: make sure that all the threads are synchronized on receive_msg and stop
2017-12-25 17:23:12 +01:00
Fabio Manganiello
97adb1a191
* Better documentation for the local backend
...
* Remove the fifos at the beginning of the test
2017-12-22 02:52:56 +01:00
Fabio Manganiello
bdf964531f
- Documented the test
...
- Removed Python 3.4 support in Travis
2017-12-22 02:40:06 +01:00
Fabio Manganiello
a26466a4bf
Added config.yaml for tests
2017-12-22 02:20:28 +01:00
Fabio Manganiello
3dfcf0ec97
Added tests
2017-12-22 02:11:56 +01:00