ha-supervisor/tests/host
Jan Čermák 0814552b2a
Use Journal Export Format for host (advanced) logs (#4963)
* Use Journal Export Format for host (advanced) logs

Add methods for handling Journal Export Format and use it for fetching
of host logs. This is foundation for colored streaming logs for other
endpoints as well.

* Make pylint happier - remove extra pass statement

* Rewrite journal gateway tests to mock ClientResponse's StreamReader

* Handle connection refused error when connecting to journal-gatewayd

* Use SYSTEMD_JOURNAL_GATEWAYD_SOCKET global path also for connection

* Use parsing algorithm suggested by @agners in review

* Fix timestamps in formatting, always use UTC for now

* Add tests for Accept header in host logs

* Apply suggestions from @agners

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Bail out of parsing earlier if field is not in required fields

* Fix parsing issue discovered in the wild and add test case

* Make verbose formatter more tolerant

* Use some bytes' native functions for some minor optimizations

* Move MalformedBinaryEntryError to exceptions module, add test for it

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-03-20 09:00:45 +01:00
..
test_apparmor_control.py Mark system as unhealthy on OSError Bad message errors (#4750) 2023-12-21 18:05:29 +01:00
test_connectivity.py Migrate to Ruff for lint and format (#4852) 2024-02-05 11:37:39 -05:00
test_control.py Use session dbus mocks for all tests (#4198) 2023-03-21 07:30:31 +01:00
test_info.py Bump black from 21.12b0 to 22.1.0 (#3425) 2022-02-10 14:13:40 +01:00
test_logs.py Use Journal Export Format for host (advanced) logs (#4963) 2024-03-20 09:00:45 +01:00
test_manager.py Allow client to change boot slot via API (#4945) 2024-03-15 10:36:37 -04:00
test_network.py Migrate to Ruff for lint and format (#4852) 2024-02-05 11:37:39 -05:00
test_supported_features.py Listen for dbus property changes (#3872) 2022-09-17 09:55:41 +02:00