author | Martin von Zweigbergk <martinvonz@google.com> |
Tue, 28 Oct 2014 22:47:22 -0700 | |
changeset 25233 | 9789b4a7c595 |
parent 22046 | 7a9cbb315d84 |
child 25472 | 4d2b9b304ad0 |
permissions | -rw-r--r-- |
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
21711
diff
changeset
|
1 |
#require gpg |
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
21711
diff
changeset
|
2 |
|
12428 | 3 |
Test the GPG extension |
8809 | 4 |
|
12428 | 5 |
$ cat <<EOF >> $HGRCPATH |
6 |
> [extensions] |
|
7 |
> gpg= |
|
8 |
> |
|
9 |
> [gpg] |
|
16350
4f795f5fbb0b
tests: make tests work if directory contains special characters
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16349
diff
changeset
|
10 |
> cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir "$TESTDIR/gpg" |
12428 | 11 |
> EOF |
12 |
$ hg init r |
|
13 |
$ cd r |
|
14 |
$ echo foo > foo |
|
15 |
$ hg ci -Amfoo |
|
16 |
adding foo |
|
8809 | 17 |
|
12428 | 18 |
$ hg sigs |
19 |
||
21711
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
20 |
$ HGEDITOR=cat hg sign -e 0 |
16927 | 21 |
signing 0:e63c23eaa88a |
21711
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
22 |
Added signature for changeset e63c23eaa88a |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
23 |
|
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
24 |
|
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
25 |
HG: Enter commit message. Lines beginning with 'HG:' are removed. |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
26 |
HG: Leave message empty to abort commit. |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
27 |
HG: -- |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
28 |
HG: user: test |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
29 |
HG: branch 'default' |
0986af9e7006
gpg: accept '--edit' like other commands creating new changeset
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20305
diff
changeset
|
30 |
HG: added .hgsigs |
8809 | 31 |
|
12428 | 32 |
$ hg sigs |
33 |
hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0 |
|
8809 | 34 |
|
12428 | 35 |
$ hg sigcheck 0 |
36 |
e63c23eaa88a is signed by: |
|
37 |
hgtest |
|
16289
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
38 |
|
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
39 |
verify that this test has not modified the trustdb.gpg file back in |
aae219a99a6e
test-gpg: make sure gpg does not modify the trustdb.gpg file
Greg Ward <greg@gerg.ca>
parents:
12428
diff
changeset
|
40 |
the main hg working dir |
16349
425f1fbcfb94
test-gpg: replace 825565136235 by md5sum check
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16345
diff
changeset
|
41 |
$ "$TESTDIR/md5sum.py" "$TESTDIR/gpg/trustdb.gpg" |
425f1fbcfb94
test-gpg: replace 825565136235 by md5sum check
Thomas Arendsen Hein <thomas@intevation.de>
parents:
16345
diff
changeset
|
42 |
f6b9c78c65fa9536e7512bb2ceb338ae */gpg/trustdb.gpg (glob) |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16350
diff
changeset
|
43 |
|
20305
e5a2177d97f0
tests: stop tracking tests/gpg/random_seed
Mads Kiilerich <madski@unity3d.com>
parents:
16927
diff
changeset
|
44 |
don't leak any state to next test run |
e5a2177d97f0
tests: stop tracking tests/gpg/random_seed
Mads Kiilerich <madski@unity3d.com>
parents:
16927
diff
changeset
|
45 |
$ rm -f "$TESTDIR/gpg/random_seed" |
e5a2177d97f0
tests: stop tracking tests/gpg/random_seed
Mads Kiilerich <madski@unity3d.com>
parents:
16927
diff
changeset
|
46 |
|
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
16350
diff
changeset
|
47 |
$ cd .. |