Skip to content

Commit ee614bc

Browse files
committed
fixup! convert to using global_account_data_mock_builder
1 parent 083f575 commit ee614bc

File tree

1 file changed

+9
-0
lines changed
  • crates/matrix-sdk/src/test_utils/mocks

1 file changed

+9
-0
lines changed

crates/matrix-sdk/src/test_utils/mocks/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,6 +1276,7 @@ impl MatrixMockServer {
12761276
///
12771277
/// # anyhow::Ok(()) });
12781278
/// ```
1279+
#[cfg(feature = "e2e-encryption")]
12791280
pub fn mock_get_default_secret_storage_key(
12801281
&self,
12811282
) -> MockEndpoint<'_, GetDefaultSecretStorageKeyEndpoint> {
@@ -1328,6 +1329,7 @@ impl MatrixMockServer {
13281329
///
13291330
/// # anyhow::Ok(()) });
13301331
/// ```
1332+
#[cfg(feature = "e2e-encryption")]
13311333
pub fn mock_get_secret_storage_key(&self) -> MockEndpoint<'_, GetSecretStorageKeyEndpoint> {
13321334
let mock = Mock::given(method("GET"));
13331335
self.mock_endpoint(mock, GetSecretStorageKeyEndpoint).expect_default_access_token()
@@ -1361,6 +1363,7 @@ impl MatrixMockServer {
13611363
///
13621364
/// # anyhow::Ok(()) });
13631365
/// ```
1366+
#[cfg(feature = "e2e-encryption")]
13641367
pub fn mock_get_master_signing_key(&self) -> MockEndpoint<'_, GetMasterSigningKeyEndpoint> {
13651368
let mock = Mock::given(method("GET"));
13661369
self.mock_endpoint(mock, GetMasterSigningKeyEndpoint).expect_default_access_token()
@@ -3696,8 +3699,10 @@ impl<'a> MockEndpoint<'a, UpdateRecentEmojisEndpoint> {
36963699
/// A prebuilt mock for a `GET
36973700
/// /_matrix/client/v3/user/{userId}/account_data/m.secret_storage.default_key`
36983701
/// request, which fetches the ID of the default secret storage key.
3702+
#[cfg(feature = "e2e-encryption")]
36993703
pub struct GetDefaultSecretStorageKeyEndpoint;
37003704

3705+
#[cfg(feature = "e2e-encryption")]
37013706
impl<'a> MockEndpoint<'a, GetDefaultSecretStorageKeyEndpoint> {
37023707
/// Returns a mock for a successful fetch of the default secret storage key.
37033708
pub fn ok(self, user_id: &UserId, key_id: &str) -> MatrixMock<'a> {
@@ -3716,8 +3721,10 @@ impl<'a> MockEndpoint<'a, GetDefaultSecretStorageKeyEndpoint> {
37163721
/// A prebuilt mock for a `GET
37173722
/// /_matrix/client/v3/user/{userId}/account_data/m.secret_storage.key.{keyId}`
37183723
/// request, which fetches information about a secret storage key.
3724+
#[cfg(feature = "e2e-encryption")]
37193725
pub struct GetSecretStorageKeyEndpoint;
37203726

3727+
#[cfg(feature = "e2e-encryption")]
37213728
impl<'a> MockEndpoint<'a, GetSecretStorageKeyEndpoint> {
37223729
/// Returns a mock for a successful fetch of the secret storage key
37233730
pub fn ok(
@@ -3740,8 +3747,10 @@ impl<'a> MockEndpoint<'a, GetSecretStorageKeyEndpoint> {
37403747
/// A prebuilt mock for a `GET
37413748
/// /_matrix/client/v3/user/{userId}/account_data/m.cross_signing.master`
37423749
/// request, which fetches information about the master signing key.
3750+
#[cfg(feature = "e2e-encryption")]
37433751
pub struct GetMasterSigningKeyEndpoint;
37443752

3753+
#[cfg(feature = "e2e-encryption")]
37453754
impl<'a> MockEndpoint<'a, GetMasterSigningKeyEndpoint> {
37463755
/// Returns a mock for a successful fetch of the master signing key
37473756
pub fn ok<B: Serialize>(self, user_id: &UserId, key_json: B) -> MatrixMock<'a> {

0 commit comments

Comments
 (0)