]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-systemd-tmpfiles.py: use test_content() at one more place
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Mar 2023 13:20:49 +0000 (22:20 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 18 Mar 2023 13:27:41 +0000 (22:27 +0900)
test/test-systemd-tmpfiles.py

index a60a6909a4fc8729f8ca6d7ce0a820b8fe7e65cd..8b42c66db845779bfc8dddb411f628a88069810e 100755 (executable)
@@ -199,12 +199,7 @@ def test_hard_cleanup(*, user):
     test_content('f= {} - - - - ' + label, label, user=user, subpath='/deep/1/2', path_cb=valid_symlink)
 
 def test_base64():
-    test_line('f~ /tmp/base64-test - - - - UGlmZgpQYWZmClB1ZmYgCg==', user=False, returncode=0)
-
-    with open("/tmp/base64-test", mode='r') as f:
-        d = f.read()
-
-    assert d == "Piff\nPaff\nPuff \n"
+    test_content('f~ {} - - - - UGlmZgpQYWZmClB1ZmYgCg==', "Piff\nPaff\nPuff \n", user=False)
 
 if __name__ == '__main__':
     test_invalids(user=False)