Skip to main content

test_client_from_env

Function test_client_from_env 

Source
pub fn test_client_from_env() -> Result<Option<HttpClient>, BaseOverrideError>
Expand description

The allow-http test client for the overrides set in the environment, or None when no BaseOverride::selects_test_client variable is set and the caller should build its production client.

In test mode every row that is set is registered – selecting or not – and nothing else is: see the module docs on exclusivity.

§Errors

BaseOverrideError::NotAUrl for a set variable that does not parse, in test mode. A malformed non-selecting variable outside test mode is the source’s to report, as before.