mirror of
https://gitlab.com/hagrid-keyserver/hagrid.git
synced 2023-02-13 20:55:02 -05:00
database: test publish with bad uid
This commit is contained in:
parent
9b3f4f6405
commit
25c9b40a1d
1 changed files with 12 additions and 0 deletions
|
@ -910,6 +910,7 @@ pub fn test_bad_uids<D: Database>(db: &mut D) {
|
|||
.generate()
|
||||
.unwrap()
|
||||
.0;
|
||||
let fpr = Fingerprint::try_from(tpk.fingerprint()).unwrap();
|
||||
let email2 = Email::from_str(str_uid2).unwrap();
|
||||
|
||||
let tpk_status = db.merge(tpk).unwrap().into_tpk_status();
|
||||
|
@ -920,6 +921,17 @@ pub fn test_bad_uids<D: Database>(db: &mut D) {
|
|||
),
|
||||
unparsed_uids: 2,
|
||||
}, tpk_status);
|
||||
|
||||
db.set_email_published(&fpr, &email2).unwrap();
|
||||
|
||||
let tpk_status = db.get_tpk_status(&fpr, &vec!(email2.clone())).unwrap();
|
||||
assert_eq!(TpkStatus {
|
||||
is_revoked: false,
|
||||
email_status: vec!(
|
||||
(email2.clone(), EmailAddressStatus::Published),
|
||||
),
|
||||
unparsed_uids: 2,
|
||||
}, tpk_status);
|
||||
}
|
||||
|
||||
pub fn test_no_selfsig<D: Database>(db: &mut D) {
|
||||
|
|
Loading…
Reference in a new issue