diff --git a/test/black-box/git-scm-switch/run.sh b/test/black-box/git-scm-switch/run.sh index 93357968..95561f18 100755 --- a/test/black-box/git-scm-switch/run.sh +++ b/test/black-box/git-scm-switch/run.sh @@ -33,7 +33,7 @@ git add test.txt git commit -m "initial commit" git tag -a -m "Tag0" tag0 d1_c0=$(git rev-parse HEAD) -git submodule add "$git_submod" submod +git -c protocol.file.allow=always submodule add "$git_submod" submod git commit -m "first commit" git tag -a -m "First Tag" tag1 git checkout -b foobar diff --git a/test/unit/test_input_gitscm.py b/test/unit/test_input_gitscm.py index 6fdc46a7..cbc9f474 100644 --- a/test/unit/test_input_gitscm.py +++ b/test/unit/test_input_gitscm.py @@ -226,6 +226,7 @@ def setUpClass(cls): with tempfile.TemporaryDirectory() as tmp: cmds = "\n".join([ 'git init .', + 'git config --local protocol.file.allow always', 'git config user.email "bob@bob.bob"', 'git config user.name test', 'git checkout -b master', @@ -537,7 +538,8 @@ def setUp(self): echo 1 > test.txt git add test.txt mkdir -p some/deep - git submodule add --name whatever ../subsub1 some/deep/path + git -c protocol.file.allow=always \ + submodule add --name whatever ../subsub1 some/deep/path git commit -m "commit 1" echo 2 > test.txt git commit -a -m "commit 2" @@ -551,7 +553,8 @@ def setUp(self): git config user.name test echo 1 > test.txt git add test.txt - git submodule add ../sub1 + git -c protocol.file.allow=always \ + submodule add ../sub1 git commit -m "commit 1" git tag -a -m 'Tag 1' tag1 cd .. @@ -633,7 +636,7 @@ def addSub2(self): cd .. cd main - git submodule add ../sub2 + git -c protocol.file.allow=always submodule add ../sub2 git commit -m "commit 2" cd .. """ diff --git a/test/unit/test_input_gitscm_status.py b/test/unit/test_input_gitscm_status.py index 2eaadfe0..b3ed65f3 100644 --- a/test/unit/test_input_gitscm_status.py +++ b/test/unit/test_input_gitscm_status.py @@ -188,7 +188,8 @@ def setUpClass(cls): echo sub > test.txt git add test.txt mkdir -p some/deep - git submodule add --name whatever ../subsub some/deep/path + git -c protocol.file.allow=always \ + submodule add --name whatever ../subsub some/deep/path git commit -m import cd .. @@ -211,8 +212,8 @@ def setUpClass(cls): git config user.name test echo main > test.txt git add test.txt - git submodule add ../sub - git submodule add ../sub2 + git -c protocol.file.allow=always submodule add ../sub + git -c protocol.file.allow=always submodule add ../sub2 git commit -m import cd .. """ @@ -393,7 +394,7 @@ def testUnexpectedSubmodule(self): self.invokeGit(scm) cmd = """\ - git submodule update --init + git -c protocol.file.allow=always submodule update --init """ subprocess.check_call([getBashPath(), "-c", cmd], cwd=self.workspace) @@ -410,7 +411,7 @@ def testUnexpectedSubSubModule(self): cmd = """\ cd sub - git submodule update --init + git -c protocol.file.allow=always submodule update --init """ subprocess.check_call([getBashPath(), "-c", cmd], cwd=self.workspace) @@ -468,7 +469,7 @@ def testSpecificUnexpectedSubmodule(self): self.invokeGit(scm) cmd = """\ - git submodule update --init sub + git -c protocol.file.allow=always submodule update --init sub """ subprocess.check_call([getBashPath(), "-c", cmd], cwd=self.workspace)