X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Ftests%2Fdrs-push-rejects;h=f102d9537efc1b84d1191a827e826eb5a90c35c7;hb=985cefa0cc7c74ec57954fc5fbd46af0bcf03297;hp=dee14b86fe68f14cea98137ef22a03991471b046;hpb=6b959bf443c37b26f058aed813885c469c660828;p=dgit.git diff --git a/tests/tests/drs-push-rejects b/tests/tests/drs-push-rejects index dee14b86..f102d953 100755 --- a/tests/tests/drs-push-rejects +++ b/tests/tests/drs-push-rejects @@ -10,6 +10,9 @@ t-worktree drs cd $p +git remote set-url origin \ + "ext::$troot/drs-git-ext %S /pari-extra.git" + mustfail () { local mpat="$1"; shift t-expect-push-fail "$mpat" \ @@ -84,6 +87,8 @@ for h in object type tag; do git update-ref refs/tags/$tag_name $badtag mustfail 'multiple headers '$h' in signed tag object' $push_spec + + t-expect-fsck-fail $badtag done done @@ -105,7 +110,7 @@ mustfail 'push is missing tag ref update' $push_spec1 mustfail 'push is missing head ref update' +$push_spec2 mustfail 'pushing unexpected ref' $push_spec HEAD:refs/wombat mustfail 'pushing multiple heads' $push_spec HEAD:refs/dgit/wombat -mustfail E:'pushing multiple tags|pushing too many similar tags' \ +mustfail E:'pushing multiple tags|pushing too many similar tags|need exactly one archive' \ $push_spec HEAD:refs/tags/$tagpfx/wombat prep unstable sid @@ -139,12 +144,7 @@ mktag mustfail 'tag name in tag is wrong' \ refs/tags/$tagpfx/wombat:refs/tags/$tagpfx/$version $push_spec1 -echo ==== -badcommit=$( - git cat-file commit HEAD | \ - perl -pe 's/^committer.*\n//' | \ - git hash-object -w -t commit --stdin -) +t-make-badcommit git checkout -b broken $badcommit prep unstable sid mktag @@ -162,7 +162,6 @@ git commit --allow-empty -m 'Dummy update' mktag mustfail 'not replacing previously-pushed version' +$push_spec1 +$push_spec2 -t-newtag re-prep mktag mustfail 'not replacing previously-pushed version' +$push_spec1 +$push_spec2 @@ -203,7 +202,4 @@ mustfail "not in permissions list although in keyring" $push_spec prep_dm_mangle '' mustsucceed $push_spec # succeeds -# we generate some junk, so we must tolerate git-fsck complaining -expect_fsck_fail=true - t-ok