add tests for parameter validation
note that this requires a change in swh-core's RPCClient (exposing self.check_status(), see swh-core!97 (closed)) that is not pushed yet, so CI will fail
Migrated from D2265 (view on Phabricator)
Merge request reports
Activity
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DGRPH/job/tox/95/ See console output for more information: https://jenkins.softwareheritage.org/job/DGRPH/job/tox/95/console
! In !150 (closed), @vlorentz wrote: Could you make the tests check for the error message? (
with raises(RemoteException, match='regexp'):
)I really think that's an antipattern. If anything, we should stop doing it elsewhere rather than adding it in more places. If the type of error matters (which is arguably the case here), it should be captured by exception attributes other than a human readable message, e.g., exception type, exception properties, etc.
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DGRPH/job/tox/100/ See console output for more information: https://jenkins.softwareheritage.org/job/DGRPH/job/tox/100/console
! In !150 (closed), @vlorentz wrote: That would be ok with me.
Now done. With the last changes in swh-core!97 (closed) we can now check that the returned HTTP status codes here are correct.
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DGRPH/job/tox/106/ See console output for more information: https://jenkins.softwareheritage.org/job/DGRPH/job/tox/106/console
Build is green See https://jenkins.softwareheritage.org/job/DGRPH/job/tox/109/ for more details.