mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-14 05:37:40 +03:00
nixosTests.paperless: check if /metadata/ can be accessed
Detects issues like #190850, when gunicorn python version doesn't match that of paperless.
This commit is contained in:
parent
4c66e7c074
commit
8a9ffb1b0b
@ -40,5 +40,13 @@ import ./make-test-python.nix ({ lib, ... }: {
|
||||
docs = json.loads(machine.succeed("curl -u admin:admin -fs localhost:28981/api/documents/"))['results']
|
||||
assert "2005-10-16" in docs[0]['created']
|
||||
assert "2005-10-16" in docs[1]['created']
|
||||
|
||||
# Detects gunicorn issues, see PR #190888
|
||||
with subtest("Document metadata can be accessed"):
|
||||
metadata = json.loads(machine.succeed("curl -u admin:admin -fs localhost:28981/api/documents/1/metadata/"))
|
||||
assert "original_checksum" in metadata
|
||||
|
||||
metadata = json.loads(machine.succeed("curl -u admin:admin -fs localhost:28981/api/documents/2/metadata/"))
|
||||
assert "original_checksum" in metadata
|
||||
'';
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user