Skip to content

Commit b48c69c

Browse files
committed
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
2 parents 9dbb375 + ed8d1d4 commit b48c69c

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

t/t5540-http-push-webdav.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ then
1818
test_done
1919
fi
2020

21+
if test_have_prereq !REFFILES
22+
then
23+
skip_all='skipping test; dumb HTTP protocol not supported with reftable.'
24+
test_done
25+
fi
26+
2127
LIB_HTTPD_DAV=t
2228
. "$TEST_DIRECTORY"/lib-httpd.sh
2329
ROOT_PATH="$PWD"

t/t5550-http-fetch-dumb.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
55
export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
66

77
. ./test-lib.sh
8+
9+
if test_have_prereq !REFFILES
10+
then
11+
skip_all='skipping test; dumb HTTP protocol not supported with reftable.'
12+
test_done
13+
fi
14+
815
. "$TEST_DIRECTORY"/lib-httpd.sh
916
start_httpd
1017

t/t7004-tag.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,21 @@ test_expect_success 'creating a tag with --create-reflog should create reflog' '
9494
git log -1 \
9595
--format="format:tag: tagging %h (%s, %cd)%n" \
9696
--date=format:%Y-%m-%d >expected &&
97-
test_when_finished "git tag -d tag_with_reflog" &&
98-
git tag --create-reflog tag_with_reflog &&
99-
git reflog exists refs/tags/tag_with_reflog &&
100-
sed -e "s/^.* //" .git/logs/refs/tags/tag_with_reflog >actual &&
97+
test_when_finished "git tag -d tag_with_reflog1" &&
98+
git tag --create-reflog tag_with_reflog1 &&
99+
git reflog exists refs/tags/tag_with_reflog1 &&
100+
test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog1 | sed -e "s/^.* //" >actual &&
101101
test_cmp expected actual
102102
'
103103

104104
test_expect_success 'annotated tag with --create-reflog has correct message' '
105105
git log -1 \
106106
--format="format:tag: tagging %h (%s, %cd)%n" \
107107
--date=format:%Y-%m-%d >expected &&
108-
test_when_finished "git tag -d tag_with_reflog" &&
109-
git tag -m "annotated tag" --create-reflog tag_with_reflog &&
110-
git reflog exists refs/tags/tag_with_reflog &&
111-
sed -e "s/^.* //" .git/logs/refs/tags/tag_with_reflog >actual &&
108+
test_when_finished "git tag -d tag_with_reflog2" &&
109+
git tag -m "annotated tag" --create-reflog tag_with_reflog2 &&
110+
git reflog exists refs/tags/tag_with_reflog2 &&
111+
test-tool ref-store main for-each-reflog-ent refs/tags/tag_with_reflog2 | sed -e "s/^.* //" >actual &&
112112
test_cmp expected actual
113113
'
114114

@@ -118,10 +118,10 @@ test_expect_success '--create-reflog does not create reflog on failure' '
118118
'
119119

120120
test_expect_success 'option core.logAllRefUpdates=always creates reflog' '
121-
test_when_finished "git tag -d tag_with_reflog" &&
121+
test_when_finished "git tag -d tag_with_reflog3" &&
122122
test_config core.logAllRefUpdates always &&
123-
git tag tag_with_reflog &&
124-
git reflog exists refs/tags/tag_with_reflog
123+
git tag tag_with_reflog3 &&
124+
git reflog exists refs/tags/tag_with_reflog3
125125
'
126126

127127
test_expect_success 'listing all tags if one exists should succeed' '

0 commit comments

Comments
 (0)