Skip to content

Draft: testing: Enforce SR from URL only when available

Enable serving SR from URL only when a SR-path-to-URL server is made available through env vars SLAPOS_TEST_SOFTWARE_ROOT_{URL|DIR}. When both are set, local SR path in SLAPOS_TEST_SOFTWARE_ROOT_DIR will be converted to an URL and the tests will supply and request using this URL. Other local SR paths outside this directory will raise an error.

When either or both variables are unset, by default local-path-to-URL conversion will be disabled. If overriden to force the conversion, an error will be raised. This re-enables the use-case of testing from a repository unrelated to the slapos-sr-testing instance, like in Theia environment.

Also make the API for URL conversion friendlier to use from SR tests.

Edited by Xavier Thompson

Merge request reports