test-gpg: make sure gpg does not modify the trustdb.gpg file stable
authorGreg Ward <greg@gerg.ca>
Wed, 21 Mar 2012 22:16:12 -0400
branchstable
changeset 16289 aae219a99a6e
parent 16288 09f2bb3a37b5
child 16290 9518cb55c822
test-gpg: make sure gpg does not modify the trustdb.gpg file Tests really should not modify files in the Mercurial working dir where they ran from! I suspect that trustdb.gpg is now old enough that GPG thinks it should update it automatically. Suppress that feature with --no-auto-check-trustdb.
tests/test-gpg.t
--- a/tests/test-gpg.t	Tue Mar 27 13:57:54 2012 -0500
+++ b/tests/test-gpg.t	Wed Mar 21 22:16:12 2012 -0400
@@ -6,7 +6,7 @@
   > gpg=
   > 
   > [gpg]
-  > cmd=gpg --no-permission-warning --no-secmem-warning --homedir $TESTDIR/gpg
+  > cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir $TESTDIR/gpg
   > EOF
   $ hg init r
   $ cd r
@@ -25,3 +25,7 @@
   $ hg sigcheck 0
   e63c23eaa88a is signed by:
    hgtest
+
+verify that this test has not modified the trustdb.gpg file back in
+the main hg working dir
+  $ hg --cwd $TESTDIR status gpg