Page MenuHomeSoftware Heritage

deposit: Wrongly formatted xml should return a 400 bad request
ClosedPublic

Authored by ardumont on Apr 17 2019, 2:19 PM.

Details

Summary

Both for multipart deposit and only-metadata (atom) deposit.

This is a new kind of badly formatted which ended up in 500 internal
error (server side).

This also contains movments in test (which i did not change), i just
moved the xml data contextually to where it's used (clearer to read).

Related T1638

Test Plan

tox

Diff Detail

Repository
rDDEP swh-deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Apr 17 2019, 2:19 PM
ardumont updated this revision to Diff 4616.Apr 17 2019, 2:22 PM

Fix typo and flake8 error

ardumont edited the summary of this revision. (Show Details)Apr 17 2019, 2:24 PM
ardumont added a project: SWORD deposit.
moranegg accepted this revision.Apr 17 2019, 2:51 PM

Validating this but we have some changes to do on the added test to follow a more restrictive grammar.

swh/deposit/tests/api/test_deposit_atom.py
498

I need to find the real reference to external_id, because I don't know from which vocabulary it is.
This is not a blocker for this diff.

swh/deposit/tests/api/test_deposit_multipart.py
412

We need to review the tests to follow a more restrictive grammar.

This revision is now accepted and ready to land.Apr 17 2019, 2:51 PM
ardumont updated this revision to Diff 4618.Apr 17 2019, 3:26 PM

Plug on master

This revision was automatically updated to reflect the committed changes.