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-true.sh
diff options
context:
space:
mode:
Diffstat (limited to '__test__/verify-submodules-true.sh')
-rwxr-xr-x__test__/verify-submodules-true.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/__test__/verify-submodules-true.sh b/__test__/verify-submodules-true.sh
new file mode 100755
index 0000000..43769fe
--- /dev/null
+++ b/__test__/verify-submodules-true.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+if [ ! -f "./submodules-true/regular-file.txt" ]; then
+ echo "Expected regular file does not exist"
+ exit 1
+fi
+
+if [ ! -f "./submodules-true/submodule-level-1/submodule-file.txt" ]; then
+ echo "Expected submodule file does not exist"
+ exit 1
+fi
+
+if [ -f "./submodules-true/submodule-level-1/submodule-level-2/nested-submodule-file.txt" ]; then
+ echo "Unexpected nested submodule file exists"
+ exit 1
+fi
+
+echo "Testing persisted credential"
+pushd ./submodules-true/submodule-level-1
+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