From 7b2bc43dba0f705987cc8c1f35620a4021838ac8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 29 Apr 2021 23:53:37 +0200 Subject: [PATCH] nixos/tests/pinnwand: add negative-test for the reaper The reaper, at this point, should not delete a freshly created paste. --- nixos/tests/pinnwand.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/tests/pinnwand.nix b/nixos/tests/pinnwand.nix index 7f6075c3c74..dc8c2744a81 100644 --- a/nixos/tests/pinnwand.nix +++ b/nixos/tests/pinnwand.nix @@ -75,6 +75,12 @@ in if line.startswith("Removal link:"): removal_link = line.split(":", 1)[1] + + # start the reaper, it shouldn't do anything meaningful here + server.systemctl("start pinnwand-reaper.service") + server.wait_until_fails("systemctl is-active -q pinnwand-reaper.service") + server.log(server.execute("journalctl -u pinnwand-reaper -e --no-pager")[1]) + # check whether paste matches what we sent client.succeed(f"curl {raw_url} > /tmp/machine-id") client.succeed("diff /tmp/machine-id /etc/machine-id")