diff --git a/tests/core/conftest.py b/tests/core/conftest.py index 2a97b71df..baef77e75 100644 --- a/tests/core/conftest.py +++ b/tests/core/conftest.py @@ -15,7 +15,7 @@ def pytest_sessionstart(): ln_setup._TESTING = True pgurl = setup_local_test_postgres() ln.setup.init( - storage="./default_storage", + storage="./default_storage_core", schema="bionty", name="lamindb-unit-tests-core", db=pgurl, @@ -30,7 +30,7 @@ def pytest_sessionstart(): def pytest_sessionfinish(session: pytest.Session): logger.set_verbosity(1) - shutil.rmtree("./default_storage") + shutil.rmtree("./default_storage_core") # handle below better in the future if ln.UPath("s3://lamindb-test/core/.lamindb").exists(): ln.UPath("s3://lamindb-test/core/.lamindb").rmdir() @@ -44,8 +44,8 @@ def pytest_sessionfinish(session: pytest.Session): scope="module", params=[ # tuple of is_in_registered_storage, path, suffix, hash of test_dir - (True, "./default_storage/", ".csv", "iGtHiFEBV3r1_TFovdQCgw"), - (True, "./default_storage/", "", "iGtHiFEBV3r1_TFovdQCgw"), + (True, "./default_storage_core/", ".csv", "iGtHiFEBV3r1_TFovdQCgw"), + (True, "./default_storage_core/", "", "iGtHiFEBV3r1_TFovdQCgw"), (True, "./registered_storage/", ".csv", "iGtHiFEBV3r1_TFovdQCgw"), (True, "./registered_storage/", "", "iGtHiFEBV3r1_TFovdQCgw"), (False, "./nonregistered_storage/", ".csv", "iGtHiFEBV3r1_TFovdQCgw"), diff --git a/tests/core/test_cache.py b/tests/core/test_cache.py index bd47b0712..f8a217ecc 100644 --- a/tests/core/test_cache.py +++ b/tests/core/test_cache.py @@ -14,12 +14,12 @@ def switch_storage(): cloud_storage = "s3://lamindb-ci/lamindb-unit-tests-cloud" set_managed_storage(cloud_storage) yield cloud_storage - set_managed_storage("./default_storage") + set_managed_storage("./default_storage_core") def test_local_cache(): # check that we have local storage - local_storage = Path("./default_storage").resolve().as_posix() + local_storage = Path("./default_storage_core").resolve().as_posix() assert ln.setup.settings.storage.root_as_str == local_storage test_file = ln.core.datasets.anndata_file_pbmc68k_test() diff --git a/tests/core/test_label_manager.py b/tests/core/test_label_manager.py index cd05d27d7..55ac4d575 100644 --- a/tests/core/test_label_manager.py +++ b/tests/core/test_label_manager.py @@ -5,13 +5,13 @@ @pytest.fixture def get_test_artifacts(): - with open("./default_storage/test-inherit1", "w") as f: + with open("./default_storage_core/test-inherit1", "w") as f: f.write("artifact1") - with open("./default_storage/test-inherit2", "w") as f: + with open("./default_storage_core/test-inherit2", "w") as f: f.write("artifact2") - artifact1 = ln.Artifact("./default_storage/test-inherit1") + artifact1 = ln.Artifact("./default_storage_core/test-inherit1") artifact1.save() - artifact2 = ln.Artifact("./default_storage/test-inherit2") + artifact2 = ln.Artifact("./default_storage_core/test-inherit2") artifact2.save() yield artifact1, artifact2 artifact1.delete(permanent=True, storage=True) diff --git a/tests/core/test_settings.py b/tests/core/test_settings.py index fa647992d..c819f95ab 100644 --- a/tests/core/test_settings.py +++ b/tests/core/test_settings.py @@ -4,7 +4,9 @@ def test_settings_switch_storage(): - assert ln.settings.storage.root.resolve() == Path("./default_storage").resolve() + assert ( + ln.settings.storage.root.resolve() == Path("./default_storage_core").resolve() + ) new_storage_location = "s3://lamindb-ci/test-settings-switch-storage" ln.settings.storage = new_storage_location assert ln.setup.settings.storage.type_is_cloud @@ -16,4 +18,4 @@ def test_settings_switch_storage(): assert not ln.setup.settings.storage.root.fs.cache_regions assert ln.Storage.filter(root=new_storage_location).one_or_none() is not None # switch back to default storage - ln.settings.storage = "./default_storage" + ln.settings.storage = "./default_storage_core" diff --git a/tests/storage/conftest.py b/tests/storage/conftest.py index 23b968d05..dee927d69 100644 --- a/tests/storage/conftest.py +++ b/tests/storage/conftest.py @@ -14,7 +14,7 @@ def pytest_sessionstart(): ln_setup._TESTING = True pgurl = setup_local_test_postgres() ln.setup.init( - storage="./default_storage", + storage="./default_storage_storage", name="lamindb-unit-tests-storage", db=pgurl, ) @@ -25,7 +25,7 @@ def pytest_sessionstart(): def pytest_sessionfinish(session: pytest.Session): logger.set_verbosity(1) - shutil.rmtree("./default_storage") + shutil.rmtree("./default_storage_storage") # handle below better in the future if ln.UPath("s3://lamindb-test/storage/.lamindb").exists(): ln.UPath("s3://lamindb-test/storage/.lamindb").rmdir()