summary refs log tree commit diff
path: root/nixos/tests/pleroma.nix
diff options
context:
space:
mode:
authorFélix Baylac-Jacqué <felix@alternativebit.fr>2021-08-09 18:40:56 +0200
committerYuka <yuka@yuka.dev>2021-08-09 21:30:42 +0200
commit885ab9286e4be1f353ee3883361d103791101d7b (patch)
treeeaba88b049d0e32ad6cee09b35c19b154b93ecc8 /nixos/tests/pleroma.nix
parent817a0e1ab1f55f3261cbee1ee0485129070e1c46 (diff)
nixosTests.pleroma: increase certificate validity duration
Analogous to 6325d15e9001a5cfd3bb7ee901adeed28d844dd6.

The test certificate expiration date was set to the default 30 days.
This certificate is generated through its own derivation. As with
every derivation, it gets cached by cache.nixos.org once we build it.

In practice, we rebuild this derivation only if one of its input
changes. The only inputs here being openssl and stdenv.

While it's not an issue on the unstable branches, it can be
problematic on a stable release: the test will fail after 30 days.

Extending the certificate lifespan from 1 month to 100 years to prevent
it from getting expired while being cached.
Diffstat (limited to 'nixos/tests/pleroma.nix')
-rw-r--r--nixos/tests/pleroma.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/tests/pleroma.nix b/nixos/tests/pleroma.nix
index 797cac44f9562..aacd9e01eb170 100644
--- a/nixos/tests/pleroma.nix
+++ b/nixos/tests/pleroma.nix
@@ -163,7 +163,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
   '';
 
   tls-cert = pkgs.runCommandNoCC "selfSignedCerts" { buildInputs = [ pkgs.openssl ]; } ''
-    openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=pleroma.nixos.test'
+    openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -nodes -subj '/CN=pleroma.nixos.test' -days 36500
     mkdir -p $out
     cp key.pem cert.pem $out
   '';