From ffe3a9293938ca2e2061a89efc161bf069bff472 Mon Sep 17 00:00:00 2001 From: Evan Rittenhouse Date: Sat, 24 Dec 2022 01:25:52 -0600 Subject: [PATCH] Add integration test for a relative submodule with an explicit base --- tests/integration/test_utils_vcs_git.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/integration/test_utils_vcs_git.py b/tests/integration/test_utils_vcs_git.py index 082741110e7..ec0f558f3fe 100644 --- a/tests/integration/test_utils_vcs_git.py +++ b/tests/integration/test_utils_vcs_git.py @@ -251,6 +251,19 @@ def test_git_clone_clones_submodules_with_relative_urls(source_url: str) -> None assert len(list(submodule_package_directory.glob("*"))) > 1 +def test_git_clone_clones_submodules_with_relative_urls_and_explicit_base( + source_url: str, +) -> None: + with Git.clone(url=source_url, branch="relative_submodule") as repo: + submodule_package_directory = ( + Path(repo.path) / "submodules" / "relative-url-submodule-with-base" + ) + + assert submodule_package_directory.exists() + assert submodule_package_directory.joinpath("README.md").exists() + assert len(list(submodule_package_directory.glob("*"))) > 1 + + def test_system_git_fallback_on_http_401( mocker: MockerFixture, source_url: str,