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
Branch
deal-with-xml-parsing-error
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5488
Build 7449: tox-on-jenkinsJenkins
Build 7448: arc lint + arc unit

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
425

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