Commit graph

10 commits

Author SHA1 Message Date
b1b51b4b7e
[tests] Fixed tests after HTTP auth refactor. 2024-07-24 21:34:30 +02:00
1e45aa5de9
A more robust logic to wait for the app to start in the tests. 2024-01-04 23:24:25 +01:00
1819ee75ef
s/Application.stop_app/Application.stop/g 2023-08-13 22:23:15 +02:00
91cd08cdff
Adapted tests to use a locally started Redis instance. 2023-07-24 10:37:07 +02:00
37dcaba7a1
Refactored structure of main application and startup scripts.
The main application class has been moved from __init__ to the app
module.

__init__ will contain instead the relevant global variables and the
modules and objects exposed to external integrations - such as
`get_plugin` and `get_backend`, or the `main` itself.

This will make future integrations much easier - the global __init__
doesn't contain any business logic now, it can import anything without
fearing circular dependencies, and it can limit its exposed objects to
those that we want to expose to 3rd-party integrations and scripts.

It will also make it easier to extend the main entry point with
additional logic - such as a supervisor or an embedded Redis server.
2023-07-23 23:12:36 +02:00
666ea9ea6b
Added use_werkzeug_server option to backend.http.
There are situations where you may not want to run the HTTP server in a
full blown WSGI-over-Tornado container - unit/integration tests and
embedded single-core devices are among those cases.

In those scenarios, we should allow the user to be able to run the
backend using the built-in Werkzeug server provided by Flask.
2023-05-20 15:26:58 +02: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
49ad3261f1 Refactored tests to use pytest with fixtures instead of unittest.TestCase 2021-03-06 16:21:28 +01:00