Commit Graph

2088 Commits

Author SHA1 Message Date
Fabio Manganiello a1791bcd80 Bump version: 0.20.3 → 0.20.4 2021-03-08 01:51:17 +01:00
Fabio Manganiello 008fea5197 Updated CHANGELOG.md 2021-03-08 01:25:23 +01:00
Fabio Manganiello c659ec507f Added tests/__main__.py entry point to run all the tests 2021-03-06 20:13:38 +01:00
Fabio Manganiello fb1953ce34 Using tests status badge from ci.platypush.tech on README instead of the Travis-CI status badge 2021-03-06 20:04:58 +01:00
Fabio Manganiello 34a108bbcb Clear log objects on teardown to prevent pytest logging errors 2021-03-06 20:02:25 +01:00
Fabio Manganiello 5be6ca50f0 Travis-CI pipeline migrated to pytest 2021-03-06 19:50:22 +01:00
Fabio Manganiello 090e7d6de8 Support for specifying the application Redis queue from the command line or service constructor 2021-03-06 19:22:13 +01:00
Fabio Manganiello 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
Fabio Manganiello 8f256e4077 Check for file creation and content multiple times with timeout 2021-03-06 17:09:40 +01:00
Fabio Manganiello 4ed80a0945 More tests improvements 2021-03-06 17:03:50 +01:00
Fabio Manganiello ca90060ba1 Tests improvements 2021-03-06 16:25:37 +01:00
Fabio Manganiello 49ad3261f1 Refactored tests to use pytest with fixtures instead of unittest.TestCase 2021-03-06 16:21:28 +01:00
Fabio Manganiello 73e16fa6b1 Updated web app files 2021-03-05 21:43:16 +01:00
Fabio Manganiello d860d8aef1 Added SmartThings switch web plugin 2021-03-05 21:29:32 +01:00
Fabio Manganiello 36aee6f787 The same applies to procedures - don't dump context as a JSON in case of exceptions 2021-03-05 19:00:26 +01:00
Fabio Manganiello 04ff008800 Context shouldn't be dumped as json in case of exceptions - if some objects are not JSON serializable then we end up with an uncaught exception 2021-03-05 18:52:57 +01:00
Fabio Manganiello 47ba13d985 calendar.ical.get_upcoming_events should fail hard if there was any exception/unsuccessful response
The error should not be swallowed and it should be instead propagated up
to calendar.get_upcoming_events, if it's called from that context. And
calendar.get_upcoming_events should be in charge of handling the
exceptions and make sure that failing to retrieve the events for one
calendar doesn't make the whole method fail.
2021-03-05 11:16:14 +01:00
Fabio Manganiello 4ada1c663d Added SmartThings plugin [#148] 2021-03-05 02:23:28 +01:00
Fabio Manganiello 210cefc1a4 General improvements on the Zeroconf plugin and backend 2021-03-03 19:20:12 +01:00
Fabio Manganiello e43147e6a3 Added CHANGELOG 2021-02-28 23:54:22 +01:00
Fabio Manganiello 66c1e59c61 Bump version: 0.20.2 → 0.20.3 2021-02-28 23:48:34 +01:00
Fabio Manganiello 0e3845ef88 The vlc _reset_state logic should be wrapped within a lock context to make sure that two threads don't try to deallocate the context at the same time 2021-02-28 20:56:32 +01:00
Fabio Manganiello 833f810d4b Fixed stop handler for vlc plugin.
For some reason, vlc event handlers are not re-entrant (https://github.com/oaubert/python-vlc/issues/44#issuecomment-378520074).

This means that the vlc API can't be used from an event handler,
and that an event handler that reacts to stop/end-of-stream by
releasing the player and the vlc instance will likely get stuck
and the app may eventually die with SIGSEGV.

Because of this design limitation on the vlc side, the plugin has
to run another thread in the main app that monitors the stop event
set by the event handler and releases the resources appropriately.
2021-02-28 13:03:10 +01:00
Fabio Manganiello d190560536 Support for media.vlc.play toggling paused state if called with no arguments, and MediaPlayRequestEvent should have player and plugin attributes set 2021-02-28 01:40:29 +01:00
Fabio Manganiello e0e3081eb1 VLC volume should strictly be an integer 2021-02-28 01:31:00 +01:00
Fabio Manganiello 708ce210ba Added missing vlc requirements 2021-02-28 01:09:35 +01:00
Fabio Manganiello d0707b6479 Bump version: 0.20.1 → 0.20.2 2021-02-27 21:27:37 +01:00
Fabio Manganiello 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
Fabio Manganiello f93df2fd49 Avoid the loop on the Zeroconf addresses object if the object is None (e.g. in the context of some tests) 2021-02-27 20:55:38 +01:00
Fabio Manganiello 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
Fabio Manganiello 36fdcf6963 - The context should be properly expanded also when calling a Python procedure
- Refactored the logic for executing a request and wrapping the response common to procedures, crons and event hook decorators into platypush.common.exec_wrapper

- Added mock getvalue() method to Logger to prevent PyCharm failures in the tests when sys.stdout is redirected to the Logger object
2021-02-27 20:27:36 +01:00
Fabio Manganiello 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
Fabio Manganiello cde5e4e4f9 Bump version: 0.20.0 → 0.20.1 2021-02-27 15:01:38 +01:00
Fabio Manganiello 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
Fabio Manganiello 9e00428568 Don't fail silently if there were errors in parsing ${} variables or getting the context 2021-02-26 22:43:54 +01:00
Fabio Manganiello b4258faa29 Fixed broken regular expressions after LINT refactor 2021-02-26 22:33:26 +01:00
Fabio Manganiello 9e4daacd74 Aligning flex elements to the right with justify-content: right doesn't work on Chromium-based browsers - use flex-end instead 2021-02-26 21:10:45 +01:00
Fabio Manganiello 61c5bae527 Bump version: 0.13.9 → 0.20.0 2021-02-24 22:41:16 +01:00
Fabio Manganiello 82fcf86900 Added README note on how to run tests 2021-02-24 22:40:39 +01:00
Fabio Manganiello a5f02c6a30 The /hook route should not require token authentication - authentication is up to the hook implementation 2021-02-24 22:21:01 +01:00
Fabio Manganiello 076cc6a63e Fixed regex format 2021-02-24 01:34:41 +01:00
Fabio Manganiello d0a579cf4b Fixed old regex sequences to r'' format 2021-02-24 01:28:46 +01:00
Fabio Manganiello 33af368940 Removed Gitlab CI - it requires too much set up for now 2021-02-24 01:03:09 +01:00
Fabio Manganiello 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
Fabio Manganiello ef36c76f10 Added CI pipeline script for Gitlab 2021-02-24 00:31:46 +01:00
Fabio Manganiello 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 2800bac3fb Make sure that all hanging threads, backends and services are stopped and their resources cleaned up when the application stops. 2021-02-23 23:09:26 +01:00
Fabio Manganiello d1b7b1768c Improved tests script 2021-02-23 01:09:03 +01:00
Fabio Manganiello 1a7d0a3b07 Added sub-section on procedures to README.md 2021-02-23 00:11:16 +01:00
Fabio Manganiello b27c9ee630 Make sure to always run .quit() on the _player instance on stop/exit event, even if the player is already stopped, otherwise the OMXPlayer session may be hanging in the background and prevent new DBus connections 2021-02-22 14:22:45 +01:00