Skip to content

Commit 4349599

Browse files
committed
Revert "wip: Fix pytest_plugin domain factory"
This reverts commit df41208.
1 parent de4199c commit 4349599

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

pulpcore/pytest_plugin.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -632,22 +632,16 @@ def _settings_factory(storage_class=None, storage_settings=None):
632632

633633
def get_installation_storage_option(key, backend):
634634
value = pulp_settings.STORAGES["default"].get("OPTIONS", {}).get(key)
635-
if value:
636-
return value
637635
# Some FileSystem backend options may be defined in the top settings module
638-
if backend != "pulpcore.app.models.storage.FileSystem":
639-
return None
640-
value = getattr(pulp_settings, key, None)
636+
if backend == "pulpcore.app.models.storage.FileSystem" and not value:
637+
value = getattr(pulp_settings, key, None)
641638
return value
642639

643640
storage_settings = storage_settings or dict()
644641
storage_backend = storage_class or pulp_settings.STORAGES["default"]["BACKEND"]
645642
unset_storage_settings = (k for k in keys[storage_backend] if k not in storage_settings)
646643
for key in unset_storage_settings:
647-
value = get_installation_storage_option(key, storage_backend)
648-
if not value:
649-
continue
650-
storage_settings[key] = value
644+
storage_settings[key] = get_installation_storage_option(key, storage_backend)
651645
return storage_backend, storage_settings
652646

653647
return _settings_factory

0 commit comments

Comments
 (0)