commit 98fb54a8de48c1fba892d5635a0a33d8026cb084
parent 9158342dc2a517b57f917c6ba343dc461fd8a079
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 27 May 2026 17:43:15 +0200
git-publish: add more tests related to unpublishing
Diffstat:
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/test_publish.sh b/test_publish.sh
@@ -118,9 +118,7 @@ GIT_PUBLISH_DIR_WWW="${srv}/www" \
git publish -d "${git}"
# Attempting to unpublish a non-published repository results in an error
-GIT_PUBLISH_DIR_GIT="${srv}/git" \
-GIT_PUBLISH_DIR_WWW="${srv}/www" \
-git publish -d "${git}" || die 1
+! git publish -d "${git}" -g "${srv}/git" -w "${srv}/www" || die 1
# The published content should be removed
[ ! -e "${srv}/git/${name}.git" ]
@@ -179,7 +177,7 @@ git publish -d "${git}"
check_git_content "file://${git}"
########################################################################
-# The repository cannot be published
+# The repository cannot be [un]published
########################################################################
# Prevent the publication of the repository
touch "${git}/publication_ban"
@@ -196,12 +194,15 @@ git publish -m "${git}"
rm "${git}/publication_ban"
# The repository cannot be published if the public path exists and it is
-# not the result of an earlier publication of the reposite
+# not the result of an earlier publication of the reposite. It cannot
+# unpublised too.
touch "${srv}/git/${name}.git"
-! git publish "${git}" || die 1
+! git publish "${git}" || die 1
+! git publish -d "${git}" || die 1
rm "${srv}/git/${name}.git"
mkdir "${srv}/git/${name}.git"
-! git publish "${git}" || die 1
+! git publish "${git}" || die 1
+! git publish -d "${git}" || die 1
rmdir "${srv}/git/${name}.git"
########################################################################