Skip to content

Commit 7dc6dab

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

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

pulpcore/pytest_plugin.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -631,23 +631,17 @@ def _settings_factory(storage_class=None, storage_settings=None):
631631
]
632632

633633
def get_installation_storage_option(key, backend):
634-
value = pulp_settings.STORAGES["default"].get("OPTIONS", {}).get(key)
635-
if value:
636-
return value
634+
value = pulp_settings.STORAGES["default"]["OPTIONS"].get(key)
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)