1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

tests: Improve quick key manipulation test.

* tests/openpgp/quick-key-manipulation.scm: Do not update the trust
database, rather be more specific when filtering the user ids.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2016-12-07 14:49:49 +01:00
parent 8636ad5023
commit 92df40a3a2

View File

@ -29,7 +29,7 @@
(define (count-uids-of-secret-key id)
(length (filter (lambda (x) (and (string=? "uid" (car x))
(string=? "u" (cadr x))))
(not (string=? "r" (cadr x)))))
(gpg-with-colons
`(--with-fingerprint
--list-secret-keys ,(exact id))))))
@ -47,8 +47,6 @@
(info "Checking quick key generation...")
(call-check `(,@GPG --quick-gen-key ,alpha))
(call-check `(,@GPG --check-trustdb)) ; XXX why?
(assert (= 1 (count-uids-of-secret-key alpha)))
(info "Checking that we can add a user ID...")
@ -70,14 +68,10 @@
(newline)
(exit 1))))
(call-check `(,@GPG --check-trustdb)) ; XXX why?
(assert (= 2 (count-uids-of-secret-key alpha)))
(assert (= 2 (count-uids-of-secret-key bravo)))
(info "Checking that we can revoke a user ID...")
(call-check `(,@GPG --quick-revuid ,(exact bravo) ,alpha))
(call-check `(,@GPG --check-trustdb)) ; XXX why?
(assert (= 1 (count-uids-of-secret-key bravo)))