diff --git a/pulp_file/pytest_plugin.py b/pulp_file/pytest_plugin.py index bd468d1ec6..0413071382 100644 --- a/pulp_file/pytest_plugin.py +++ b/pulp_file/pytest_plugin.py @@ -69,7 +69,15 @@ def _file_distribution_factory(pulp_domain=None, **body): kwargs = {} if pulp_domain: kwargs["pulp_domain"] = pulp_domain - return gen_object_with_cleanup(file_bindings.DistributionsFileApi, data, **kwargs) + file_distribution = gen_object_with_cleanup(file_bindings.DistributionsFileApi, data, **kwargs) + + # if the base_url starts with / it means content_origin is not defined + if file_distribution.base_url.startswith("/"): + file_distribution.base_url.replace("/", "https://pulp/", 1) + #file_distribution.base_url="https://pulp/" + return file_distribution + + return _file_distribution_factory