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 Push deposit
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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
497

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
411

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
This revision was automatically updated to reflect the committed changes.