Allow configuration of submodule.fetchJobs

This commit is contained in:
Gonzalo Peci
2023-12-14 14:53:04 +01:00
committed by GitHub
parent b4ffde65f4
commit 2bd5ef5487
11 changed files with 271 additions and 102 deletions

View File

@@ -811,6 +811,7 @@ async function setup(testName: string): Promise<void> {
lfs: false,
submodules: false,
nestedSubmodules: false,
submodulesFetchJobs: '1',
persistCredentials: true,
ref: 'refs/heads/main',
repositoryName: 'my-repo',

View File

@@ -0,0 +1,33 @@
#!/bin/bash
if [ ! -f "./submodules-recursive/regular-file.txt" ]; then
echo "Expected regular file does not exist"
exit 1
fi
if [ ! -f "./submodules-recursive/submodule-level-1/submodule-file.txt" ]; then
echo "Expected submodule file does not exist"
exit 1
fi
if [ ! -f "./submodules-recursive/submodule-level-1/submodule-level-2/nested-submodule-file.txt" ]; then
echo "Expected nested submodule file does not exists"
exit 1
fi
echo "Testing fetchJobs exists"
git config --local --get-regexp submodules.fetchJobs | grep 10
if [ "$?" != "0" ]; then
echo "Failed to validate fetchJobs configuration"
exit 1
fi
echo "Testing persisted credential"
pushd ./submodules-recursive/submodule-level-1/submodule-level-2
git config --local --name-only --get-regexp http.+extraheader && git fetch
if [ "$?" != "0" ]; then
echo "Failed to validate persisted credential"
popd
exit 1
fi
popd