3
0
Fork 0
forked from mirrors/nixpkgs

nixos/tests/pinnwand: add negative-test for the reaper

The reaper, at this point, should not delete a freshly created paste.
This commit is contained in:
Martin Weinelt 2021-04-29 23:53:37 +02:00
parent f1c32c2809
commit 7b2bc43dba
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -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")