Request authentication in WebDAV test suite
This MR contributes a first version of configuring authentication per file/directory for the WebDAV test suite.
-
Auth objects (
BasicAuth
, ...) have to be instantiated in the specific test file. That is a mismatch to the otherwise pure-dict spec containing the information for known files and directories. Instantiating auth objects is perhaps the simplest way to express the no auth/basic auth/token auth configuration.We could consider switching to instantiating the full info objects directly.
- → This MR requires specifying full info objects directly
-
Tests involving multiple entities (e.g. copying a file to a collection,
test_copy_accessible
) must have the same authentication attached to the entities - i.e. info objects - to be meaningful. However, for parameterised fixtures, pytest will run all combinations (cartesian product) of parameter values. Thesingle_auth_info
fixture will automatically discard combinations of parameter values containing different authentications. It does so by marking the test as skipped, seeMismatching auth infos
in the output.The skipping behaviour makes reviewing tests complicated: If there happens to be no single combination of parameter values with the same auth, the underlying test (e.g.
test_copy_accessible
) is never executed and this is only visible when looking at passed vs skipped tests. This is even more complicated, because for the particular trick with the common suite, not all information is shown at the same time (try identifying which function is skipped due to mismatching auths purely from output...).A possible fix could be to check after the testing completes whether a specific function was always skipped with a mismatching auth message.
- → There will be an issue filed for possibly tackling this in the future
-
Non-existent entities are not specified by in the test file right now but instead chosen in the generic suite. To fulfill the above requirement, these will need authentication as well, so for example these must be specified in the specific test file.
- → This MR allows specifying non-existent "paths" (as these don't exist there is no distinction between files and directories)
/cc @cw296