diff --git a/support/testing/tests/init/test_systemd.py b/support/testing/tests/init/test_systemd.py index 472a65db57..60b9c3d032 100644 --- a/support/testing/tests/init/test_systemd.py +++ b/support/testing/tests/init/test_systemd.py @@ -340,19 +340,16 @@ class InitSystemSystemdBaseOverlayfs(): # /var/foo/bar is from the pre-populated /var, so it should # not be present in the upper of the overlay - _, exit_code = self.emulator.run("test -e /run/buildroot/mounts/var/upper/foo/bar") - self.assertNotEqual(exit_code, 0) + self.assertRunNotOk("test -e /run/buildroot/mounts/var/upper/foo/bar") # We can write in /var/foo/bar - _, exit_code = self.emulator.run("echo barfoo >/var/foo/bar") - self.assertEqual(exit_code, 0) + self.assertRunOk("echo barfoo >/var/foo/bar") # ... and it contains the new content out, exit_code = self.emulator.run("cat /var/foo/bar") self.assertEqual(exit_code, 0) self.assertEqual(out[0], "barfoo") # ... and it to appears in the upper - _, exit_code = self.emulator.run("test -e /run/buildroot/mounts/var/upper/foo/bar") - self.assertEqual(exit_code, 0) + self.assertRunOk("test -e /run/buildroot/mounts/var/upper/foo/bar") # ... with the new content out, exit_code = self.emulator.run("cat /run/buildroot/mounts/var/upper/foo/bar") self.assertEqual(exit_code, 0)