diff options
author | Guido Günther <agx@sigxcpu.org> | 2022-11-24 15:45:03 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2022-11-24 16:09:18 +0100 |
commit | 2e1ff957a14dc495b7f10a6b9590cc50cb5992aa (patch) | |
tree | 5d8cefebb5ceac2e1c96c64ddcafa1e2294ade76 | |
parent | 13591422ef97fe64e1957bf94156abe9701985ee (diff) |
tests: Allow file protocol for submodule test
Closes: #1023379
-rw-r--r-- | tests/04_test_submodules.py | 3 | ||||
-rw-r--r-- | tests/component/deb/test_import_orig.py | 2 | ||||
-rw-r--r-- | tests/component/rpm/test_buildpackage_rpm.py | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/tests/04_test_submodules.py b/tests/04_test_submodules.py index 52e15ddb..5e097694 100644 --- a/tests/04_test_submodules.py +++ b/tests/04_test_submodules.py @@ -46,6 +46,7 @@ def setup(): REPODIR = TMPDIR.join('test_repo') REPO = DebianGitRepository.create(REPODIR) + os.environ['GIT_ALLOW_PROTOCOL'] = 'file' for name in SUBMODULE_NAMES: SUBMODULES.append(Submodule(name, str(TMPDIR))) @@ -54,7 +55,9 @@ def setup(): def teardown(): """Test module teardown""" + context.teardown() + del os.environ['GIT_ALLOW_PROTOCOL'] def test_empty_has_submodules(): diff --git a/tests/component/deb/test_import_orig.py b/tests/component/deb/test_import_orig.py index 745024e4..2a949fbd 100644 --- a/tests/component/deb/test_import_orig.py +++ b/tests/component/deb/test_import_orig.py @@ -505,7 +505,9 @@ class TestImportOrig(ComponentTestBase): Test that importing works if repo is a git submodule (#674015) """ parent_repo = GitRepository.create('../parent') + os.environ['GIT_ALLOW_PROTOCOL'] = 'file' parent_repo.add_submodule(repo.path) + del os.environ['GIT_ALLOW_PROTOCOL'] parent_repo.update_submodules(init=True, recursive=True) submodule = GitRepository(os.path.join(parent_repo.path, 'hello-debhelper')) diff --git a/tests/component/rpm/test_buildpackage_rpm.py b/tests/component/rpm/test_buildpackage_rpm.py index 51c76cb1..fe3cb7b3 100644 --- a/tests/component/rpm/test_buildpackage_rpm.py +++ b/tests/component/rpm/test_buildpackage_rpm.py @@ -367,7 +367,9 @@ class TestGbpRpm(RpmRepoTestBase): pkg_branch = repo.get_branch() upstr_branch = 'upstream' repo.set_branch(upstr_branch) + os.environ['GIT_ALLOW_PROTOCOL'] = 'file' repo.add_submodule(sub_repo.path) + del os.environ['GIT_ALLOW_PROTOCOL'] repo.commit_all('Add submodule') repo.set_branch(pkg_branch) @@ -407,7 +409,9 @@ class TestGbpRpm(RpmRepoTestBase): # Create submodule sub_repo = self.orig_repos['gbp-test-native2'] + os.environ['GIT_ALLOW_PROTOCOL'] = 'file' repo.add_submodule(sub_repo.path) + del os.environ['GIT_ALLOW_PROTOCOL'] repo.commit_all('Add submodule') sub_files = sub_repo.ls_tree('HEAD') |