Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3559277
D12344.id41100.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D12344.id41100.diff
View Options
diff --git a/services/commtest/src/identity/mod.rs b/services/commtest/src/identity/mod.rs
--- a/services/commtest/src/identity/mod.rs
+++ b/services/commtest/src/identity/mod.rs
@@ -7,12 +7,12 @@
pub mod device;
pub mod olm_account_infos;
-pub struct SigningCapableAccount {
+pub struct MockOlmAccount {
// primary account ed25519 keypair
signing_key: Keypair,
}
-impl SigningCapableAccount {
+impl MockOlmAccount {
pub fn new() -> Self {
let mut rng = OsRng {};
let signing_key = Keypair::generate(&mut rng);
@@ -36,7 +36,7 @@
}
}
-impl Default for SigningCapableAccount {
+impl Default for MockOlmAccount {
fn default() -> Self {
Self::new()
}
diff --git a/services/commtest/tests/identity_access_tokens_tests.rs b/services/commtest/tests/identity_access_tokens_tests.rs
--- a/services/commtest/tests/identity_access_tokens_tests.rs
+++ b/services/commtest/tests/identity_access_tokens_tests.rs
@@ -1,7 +1,7 @@
use commtest::identity::device::{
register_user_device, DEVICE_TYPE, PLACEHOLDER_CODE_VERSION,
};
-use commtest::identity::SigningCapableAccount;
+use commtest::identity::MockOlmAccount;
use commtest::service_addr;
use grpc_clients::identity::protos::unauth::{
Empty, ExistingDeviceLoginRequest,
@@ -42,7 +42,7 @@
.await
.expect("Couldn't connect to identity service");
- let account = SigningCapableAccount::new();
+ let account = MockOlmAccount::new();
let client_keys = account.public_keys();
let user = register_user_device(Some(&client_keys), None).await;
diff --git a/services/commtest/tests/identity_device_list_tests.rs b/services/commtest/tests/identity_device_list_tests.rs
--- a/services/commtest/tests/identity_device_list_tests.rs
+++ b/services/commtest/tests/identity_device_list_tests.rs
@@ -7,7 +7,7 @@
register_user_device_with_device_list, DEVICE_TYPE, PLACEHOLDER_CODE_VERSION,
};
use commtest::identity::olm_account_infos::ClientPublicKeys;
-use commtest::identity::SigningCapableAccount;
+use commtest::identity::MockOlmAccount;
use commtest::service_addr;
use grpc_clients::identity::authenticated::ChainedInterceptedAuthClient;
use grpc_clients::identity::protos::auth::{
@@ -154,7 +154,7 @@
type DeviceListHistoryItem = (Option<String>, Vec<String>);
// Register user with primary device
- let mut primary_account = SigningCapableAccount::new();
+ let mut primary_account = MockOlmAccount::new();
let primary_device_keys = primary_account.public_keys();
let primary_device_id = primary_device_keys.device_id();
let user =
@@ -376,7 +376,7 @@
#[tokio::test]
async fn test_initial_device_list() {
// create signing account
- let mut primary_account = SigningCapableAccount::new();
+ let mut primary_account = MockOlmAccount::new();
let primary_device_keys = primary_account.public_keys();
let primary_device_id = primary_device_keys.device_id().to_string();
@@ -470,8 +470,8 @@
fn create_signed(
raw: &RawDeviceList,
- cur_primary_account: &mut SigningCapableAccount,
- last_primary_account: Option<&mut SigningCapableAccount>,
+ cur_primary_account: &mut MockOlmAccount,
+ last_primary_account: Option<&mut MockOlmAccount>,
) -> Self {
let raw_device_list = raw.as_json_string();
let cur_primary_signature =
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 28, 5:49 AM (7 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2714815
Default Alt Text
D12344.id41100.diff (3 KB)
Attached To
Mode
D12344: [commtest] Rename SigningCapableAccount to MockOlmAccount
Attached
Detach File
Event Timeline
Log In to Comment