From 066c8e88882c195edb7cd613432094e4f9ed695e Mon Sep 17 00:00:00 2001 From: Jeremy Frasier Date: Tue, 30 Apr 2024 13:07:00 -0400 Subject: [PATCH] Comment out call to Service.exists This functionality from pytest-testinfra is currently broken. See pytest-dev/pytest-testinfra#757 for more details. Once pytest-dev/pytest-testinfra#754 has been merged and a new release of pytest-testinfra is created the Service.exists line can be restored. --- molecule/default/tests/test_default.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/molecule/default/tests/test_default.py b/molecule/default/tests/test_default.py index bc4a5b9..6644bf2 100644 --- a/molecule/default/tests/test_default.py +++ b/molecule/default/tests/test_default.py @@ -32,6 +32,11 @@ def test_symlink(host): def test_services(host): """Verify that the expected services are present.""" - s = host.service("systemd-resolved.service") - assert s.exists, "systemd-resolved.service does not exist." - assert s.is_enabled, "systemd-resolved.service is not enabled." + s = host.service("systemd-resolved") + # This assertion currently fails because of + # pytest-dev/pytest-testinfra#757. Once + # pytest-dev/pytest-testinfra#754 has been merged and a new + # release is created the following line can be uncommented. + # assert s.exists, "systemd-resolved service does not exist." + assert s.is_enabled, "systemd-resolved service is not enabled." + assert s.is_running, "systemd-resolved service is not running."