-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from xcp-ng/systemd_failed_units
Print the full error message for failed systemd units
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,14 @@ | |
def test_failed_units(host): | ||
failed_services = host.ssh(['systemctl', '--state=failed', '--full', '--all', | ||
'--no-pager', '--no-legend']) | ||
for unit in failed_services.splitlines(): | ||
logging.error(f"Unit {unit.split()[0]} failed") | ||
|
||
assert not failed_services | ||
if failed_services: | ||
pytest.fail(failed_services) | ||
|
||
white_list_issues = [ | ||
"Cannot add dependency job for unit [email protected], ignoring: Unit is masked.", | ||
"Cannot add dependency job for unit display-manager.service, ignoring: Unit not found.", | ||
"Cannot add dependency job for unit qemuback.service, ignoring: Unit not found.", | ||
"Cannot add dependency job for unit sr_health_check.timer, ignoring: Unit not found.", | ||
] | ||
|
||
pytest.fixture(scope='module') | ||
|