diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index adbdbdda1714625cc2f934509ad32cc588b6c3fc..7c0209c6a9819e29dc83c1ce16c2cf888c90f1a3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,8 +9,8 @@ variables: CONTAINER_GALAXY_URL: "${NDIP_DOCKER_REPOSITORY}/${CI_PROJECT_PATH}" CONTAINER_GALAXY_BASE_URL: "${CONTAINER_GALAXY_URL}/base" CONTAINER_GALAXY_COMMIT_URL: "${CONTAINER_GALAXY_URL}/commit" - GALAXY_VERSION_PYTHON: 25.1.dev3+ornl - GALAXY_VERSION_DOCKER: 25.1.dev3.ornl + GALAXY_VERSION_PYTHON: 25.1.dev4+ornl + GALAXY_VERSION_DOCKER: 25.1.dev4.ornl # This import is for the func_rse_docker_* functions before_script: diff --git a/lib/galaxy/objectstore/rucio.py b/lib/galaxy/objectstore/rucio.py index b42f86dcdcdc57f4b599c65e82af0a056daa7171..5dba4560cf37a6d43685db817473654d20e3e988 100644 --- a/lib/galaxy/objectstore/rucio.py +++ b/lib/galaxy/objectstore/rucio.py @@ -165,6 +165,7 @@ class RucioBroker: temp_directory = self.extra_dirs["temp"] self.rucio_config_path = os.path.join(temp_directory, "rucio.cfg") key_for_pass = "password" + os.makedirs(temp_directory, exist_ok=True) with open(self.rucio_config_path, "w") as f: f.write( f"""[client] diff --git a/test/unit/tool_shed/test_files/toolshed_community_files.tgz b/test/unit/tool_shed/test_files/toolshed_community_files.tgz new file mode 100644 index 0000000000000000000000000000000000000000..af271d0219f4beb81947b62d741fef1472e713f1 Binary files /dev/null and b/test/unit/tool_shed/test_files/toolshed_community_files.tgz differ diff --git a/test/unit/tool_shed/test_shed_index.py b/test/unit/tool_shed/test_shed_index.py index 1bfce9adf3d3e42efea94b7d90ad196b737652b8..a9ac528c9561bdc9f15aedea863fd5eb7568bc64 100644 --- a/test/unit/tool_shed/test_shed_index.py +++ b/test/unit/tool_shed/test_shed_index.py @@ -3,6 +3,7 @@ import shutil import tempfile from collections import namedtuple from io import BytesIO +from pathlib import Path import pytest import requests @@ -11,7 +12,7 @@ from whoosh import index from galaxy.util.compression_utils import CompressedFile from tool_shed.util.shed_index import build_index -URL = "https://github.com/mvdbeek/toolshed-test-data/blob/master/toolshed_community_files.tgz?raw=true" +PATH = Path(__file__).resolve().parent / "test_files" / "toolshed_community_files.tgz" @pytest.fixture @@ -26,9 +27,8 @@ def whoosh_index_dir(): @pytest.fixture(scope="module") def community_file_dir(): extracted_archive_dir = tempfile.mkdtemp() - response = requests.get(URL) - response.raise_for_status() - b = BytesIO(response.content) + with open(PATH, "rb") as community_file: + b = BytesIO(community_file.read()) with CompressedFile.open_tar(b) as tar: tar.extractall(extracted_archive_dir) try: @@ -39,12 +39,16 @@ def community_file_dir(): @pytest.fixture() def community_file_structure(community_file_dir): - community = namedtuple("community", "file_path hgweb_config_dir hgweb_repo_prefix dburi") + community = namedtuple( + "community", "file_path hgweb_config_dir hgweb_repo_prefix dburi" + ) return community( file_path=os.path.join(community_file_dir, "database", "community_files"), hgweb_config_dir=community_file_dir, hgweb_repo_prefix="repos/", - dburi="sqlite:///{}".format(os.path.join(community_file_dir, "database", "community.sqlite")), + dburi="sqlite:///{}".format( + os.path.join(community_file_dir, "database", "community.sqlite") + ), )