Commit aa73db58 authored by Jérome Perrin's avatar Jérome Perrin

dufs,restic-rest-server: fix certificate renewal tests

The configuration of caucase used here is to have certificates valid for
3*31 days and renew them 31 days before the expiration date.
This test was running the updater 2 months later, which by chance was
62 days at the time of the test was written, because this test was
written in July (both July and August have 31 days), but this does not
work in other months.
Adjust the test to run the updater using a fixed number of days in the
future.
parent dd5bc0e0
Pipeline #29442 failed with stage
......@@ -131,14 +131,14 @@ class TestFileServer(SlapOSInstanceTestCase):
return cnx.sock._sslobj.getpeercert()
cert_before = _getpeercert()
# execute certificate updater two month later, when it's time to renew certificate.
# execute certificate updater when it's time to renew certificate.
# use a timeout, because this service runs forever
subprocess.run(
(
'timeout',
'5',
'faketime',
'+2 months',
'+63 days',
os.path.join(
self.computer_partition_root_path,
'etc/service/dufs-certificate-updater'),
......
......@@ -158,14 +158,14 @@ class TestResticRestServer(SlapOSInstanceTestCase):
return cnx.sock._sslobj.getpeercert()
cert_before = _getpeercert()
# execute certificate updater two month later, when it's time to renew certificate.
# execute certificate updater when it's time to renew certificate.
# use a timeout, because this service runs forever
subprocess.run(
(
'timeout',
'5',
'faketime',
'+2 months',
'+63 days',
os.path.join(
self.computer_partition_root_path,
'etc/service/rest-server-certificate-updater'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment