chiark / gitweb /
Test suite: Test pushing with forcing old and new tag format
[dgit.git] / tests / lib
index 7b7bcfbaafecb5f5778a44fecb71f263a7abd72d..38605bd9359e2f9200b1d4737ef3f235f60887e7 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -62,6 +62,8 @@ incoming              = $tmp/incoming
 run_dinstall           = 0
 END
 
+: ${tagpfx:=test-dummy}
+
 t-git-next-date () {
        GIT_COMMITTER_DATE="$(( ${GIT_COMMITTER_DATE%% *} + 1 )) ${GIT_COMMITTER_DATE#* }"
        GIT_AUTHOR_DATE="$GIT_COMMITTER_DATE"
@@ -427,7 +429,7 @@ t-refs-notexist () {
 }
 
 t-v-tag () {
-       echo refs/tags/test-dummy/${v//\~/_}
+       echo refs/tags/$tagpfx/${v//\~/_}
 }
 
 t-check-pushed-master () {
@@ -612,6 +614,14 @@ t-drs () {
        ln -sf /bin/true $drs_dispatch/policy-hook
 }
 
+t-newtag () {
+ export tagpfx=archive/test-dummy
+ t-git-config dgit-distro.test-dummy.dgit-tag-format new
+}
+t-oldtag () {
+ t-git-config dgit-distro.test-dummy.dgit-tag-format old
+}
+
 t-dsd () {
        t-drs
  t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"