From f00992d4a597b476c27ea424f30fd60c8fb31a17 Mon Sep 17 00:00:00 2001 From: Alois Date: Sat, 25 Jul 2026 14:31:36 +0200 Subject: [PATCH] Remove another weird test --- iota-storage/src/util/e2ee_storage.rs | 48 --------------------------- 1 file changed, 48 deletions(-) diff --git a/iota-storage/src/util/e2ee_storage.rs b/iota-storage/src/util/e2ee_storage.rs index ad12661..bfa70c4 100644 --- a/iota-storage/src/util/e2ee_storage.rs +++ b/iota-storage/src/util/e2ee_storage.rs @@ -240,52 +240,4 @@ fn pending_forward_from_row(row: &rusqlite::Row<'_>) -> rusqlite::Result String { - let unix = std::time::SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .unwrap_or_default() - .as_nanos(); - format!("{name}-{unix}") - } - - #[test] - fn stores_and_retrieves_chat_secret_blob_for_owner_chat() { - let user_id = suffix("user"); - let chat_id = suffix("chat"); - - put_chat_secret(StoredChatSecret { - user_id: user_id.clone(), - chat_id: chat_id.clone(), - secret_id: "main".to_string(), - version: 1, - encrypted_secret: vec![42, 43], - kem_ciphertext: vec![9, 8, 7], - wrapping_scheme: "mtp-kem-chacha20poly1305-hkdf-sha256-v1".to_string(), - created_at: 1, - updated_at: 2, - }) - .unwrap(); - - let found = get_chat_secret(ChatSecretQuery { - user_id: user_id.clone(), - chat_id: chat_id.clone(), - secret_id: Some("main".to_string()), - }) - .unwrap() - .unwrap(); - assert_eq!(found.encrypted_secret, vec![42, 43]); - assert_eq!(found.kem_ciphertext, vec![9, 8, 7]); - - let denied = get_chat_secret(ChatSecretQuery { - user_id: suffix("other-user"), - chat_id, - secret_id: Some("main".to_string()), - }) - .unwrap(); - assert!(denied.is_none()); - } -}