chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test suite: Fully test replay attack prevention
[dgit.git]
/
tests
/
tests
/
drs-push-rejects
diff --git
a/tests/tests/drs-push-rejects
b/tests/tests/drs-push-rejects
index fdd390dfa837e6f38d71a2098f81fb3be7295656..5f6d04a498792e43ef1c318693f31498ae9dfde7 100755
(executable)
--- a/
tests/tests/drs-push-rejects
+++ b/
tests/tests/drs-push-rejects
@@
-86,7
+86,7
@@
for h in object type tag; do
cat badtag.asc >>badtag
set +e
cat badtag.asc >>badtag
set +e
- LC_
ALL
=C git hash-object -w -t tag badtag >badtag.hash 2>badtag.err
+ LC_
MESSAGES
=C git hash-object -w -t tag badtag >badtag.hash 2>badtag.err
rc=$?
set -e
rc=$?
set -e
@@
-128,6
+128,7
@@
prep unstable sid
mktag
echo woody >$tmp/suites
mustfail 'unknown suite' $push_spec
mktag
echo woody >$tmp/suites
mustfail 'unknown suite' $push_spec
+cp $root/tests/suites $tmp/.
# fixme:
# or reject "command string not understood";
# fixme:
# or reject "command string not understood";
@@
-158,8
+159,13
@@
prep unstable sid
mktag
mustsucceed $push_spec # succeeds
mktag
mustsucceed $push_spec # succeeds
+mktag
+mustfail 'push is missing head ref update' $push_spec
+
+git commit --allow-empty -m 'Dummy update'
mktag
mustfail 'not replacing previously-pushed version' $push_spec
mktag
mustfail 'not replacing previously-pushed version' $push_spec
+git reset --hard HEAD~
prep_dm_mangle () {
prep unstable sid
prep_dm_mangle () {
prep unstable sid