]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: don't restart journal-upload on an expected fail
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 17 Oct 2023 10:49:03 +0000 (12:49 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 17 Oct 2023 13:55:12 +0000 (14:55 +0100)
In c08bec1587 the journal-upload unit gained Restart=on-fail, which goes
against this one particular test that expects the unit to fail, making
the test flaky. Let's disable the automatic restarts just for this test
to make it stable once again.

test/units/testsuite-04.journal-remote.sh

index c0b95caec34fb99e5dcc29f82fc9f8dbbf5c7b56..c543129da954d8bef075610588532892df485eb9 100755 (executable)
@@ -209,6 +209,12 @@ ServerCertificateFile=/run/systemd/journal-remote-tls/cert.pem
 TrustedCertificateFile=/run/systemd/remote-pki/ca.crt
 EOF
 systemd-analyze cat-config systemd/journal-upload.conf
+mkdir -p /run/systemd/system/systemd-journal-upload.service.d
+cat >/run/systemd/system/systemd-journal-upload.service.d/99-test.conf <<EOF
+[Service]
+Restart=no
+EOF
+systemctl daemon-reload
 setfacl -R -m "u:systemd-journal-upload:rwX" /run/systemd/journal-remote-tls
 
 systemctl restart systemd-journal-upload