Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/__test__/verify-submodules-recursive.sh
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2020-03-05 14:21:59 -0500
committerGitHub <noreply@github.com>2020-03-05 14:21:59 -0500
commit7ca5766bfacc6c307d7e69645aa94ac44318af46 (patch)
tree6cf0884441af3df11112f769de7e2bd6b2db727e /__test__/verify-submodules-recursive.sh
parent05e00fbe0759a9339f189796ba5ceb3c4c78a556 (diff)
add support for submodules (#173)
Diffstat (limited to '__test__/verify-submodules-recursive.sh')
-rwxr-xr-x__test__/verify-submodules-recursive.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/__test__/verify-submodules-recursive.sh b/__test__/verify-submodules-recursive.sh
new file mode 100755
index 0000000..1b68f9b
--- /dev/null
+++ b/__test__/verify-submodules-recursive.sh
@@ -0,0 +1,26 @@
+#!/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 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