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
This commit is contained in:
commit
b48c69c3c8
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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' '
|
||||
|
Loading…
Reference in New Issue
Block a user