summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-01-10 19:52:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-01-10 19:52:50 (GMT)
commitb48c69c3c8a0e6e44f31c70677ac40658d8f3439 (patch)
tree7b3271c30434c7572b9956ed9942c22a872907f0
parent9dbb375f94091279e0c9f52f0a3b559a60244da4 (diff)
parented8d1d42d0ffc221340557614aa33bf8d3aba65f (diff)
downloadgit-b48c69c3c8a0e6e44f31c70677ac40658d8f3439.zip
git-b48c69c3c8a0e6e44f31c70677ac40658d8f3439.tar.gz
git-b48c69c3c8a0e6e44f31c70677ac40658d8f3439.tar.bz2
Merge branch 'hn/ref-api-tests-update'
Test updates. * hn/ref-api-tests-update: t7004: use "test-tool ref-store" for reflog inspection t7004: create separate tags for different tests t5550: require REFFILES t5540: require REFFILES
-rwxr-xr-xt/t5540-http-push-webdav.sh6
-rwxr-xr-xt/t5550-http-fetch-dumb.sh7
-rwxr-xr-xt/t7004-tag.sh22
3 files changed, 24 insertions, 11 deletions
diff --git a/t/t5540-http-push-webdav.sh b/t/t5540-http-push-webdav.sh
index 8b68bb3..b0dbacf 100755
--- a/t/t5540-http-push-webdav.sh
+++ b/t/t5540-http-push-webdav.sh
@@ -18,6 +18,12 @@ then
test_done
fi
+if test_have_prereq !REFFILES
+then
+ skip_all='skipping test; dumb HTTP protocol not supported with reftable.'
+ test_done
+fi
+
LIB_HTTPD_DAV=t
. "$TEST_DIRECTORY"/lib-httpd.sh
ROOT_PATH="$PWD"
diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
index 6d9142a..2592039 100755
--- a/t/t5550-http-fetch-dumb.sh
+++ b/t/t5550-http-fetch-dumb.sh
@@ -5,6 +5,13 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. ./test-lib.sh
+
+if test_have_prereq !REFFILES
+then
+ skip_all='skipping test; dumb HTTP protocol not supported with reftable.'
+ test_done
+fi
+
. "$TEST_DIRECTORY"/lib-httpd.sh
start_httpd
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 25a2656..9aa1660 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -94,10 +94,10 @@ test_expect_success 'creating a tag with --create-reflog should create reflog' '
git log -1 \
--format="format:tag: tagging %h (%s, %cd)%n" \
--date=format:%Y-%m-%d >expected &&
- test_when_finished "git tag -d tag_with_reflog" &&
- git tag --create-reflog tag_with_reflog &&
- git reflog exists refs/tags/tag_with_reflog &&
- sed -e "s/^.* //" .git/logs/refs/tags/tag_with_reflog >actual &&
+ test_when_finished "git tag -d tag_with_reflog1" &&
+ git tag --create-reflog tag_with_reflog1 &&
+ git reflog exists refs/tags/tag_with_reflog1 &&
+ test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog1 | sed -e "s/^.* //" >actual &&
test_cmp expected actual
'
@@ -105,10 +105,10 @@ test_expect_success 'annotated tag with --create-reflog has correct message' '
git log -1 \
--format="format:tag: tagging %h (%s, %cd)%n" \
--date=format:%Y-%m-%d >expected &&
- test_when_finished "git tag -d tag_with_reflog" &&
- git tag -m "annotated tag" --create-reflog tag_with_reflog &&
- git reflog exists refs/tags/tag_with_reflog &&
- sed -e "s/^.* //" .git/logs/refs/tags/tag_with_reflog >actual &&
+ test_when_finished "git tag -d tag_with_reflog2" &&
+ git tag -m "annotated tag" --create-reflog tag_with_reflog2 &&
+ git reflog exists refs/tags/tag_with_reflog2 &&
+ test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog2 | sed -e "s/^.* //" >actual &&
test_cmp expected actual
'
@@ -118,10 +118,10 @@ test_expect_success '--create-reflog does not create reflog on failure' '
'
test_expect_success 'option core.logAllRefUpdates=always creates reflog' '
- test_when_finished "git tag -d tag_with_reflog" &&
+ test_when_finished "git tag -d tag_with_reflog3" &&
test_config core.logAllRefUpdates always &&
- git tag tag_with_reflog &&
- git reflog exists refs/tags/tag_with_reflog
+ git tag tag_with_reflog3 &&
+ git reflog exists refs/tags/tag_with_reflog3
'
test_expect_success 'listing all tags if one exists should succeed' '