Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
cameronvoell committed Apr 8, 2024
1 parent ec554c3 commit 12e5c51
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 0 additions & 1 deletion xmtp_mls/src/groups/intents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ impl From<Vec<u8>> for PostCommitAction {

#[cfg(test)]
mod tests {
use serde_json::to_string;
use xmtp_cryptography::utils::generate_local_wallet;

use super::*;
Expand Down
1 change: 0 additions & 1 deletion xmtp_mls/src/groups/subscriptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ where
mod tests {
use prost::Message;
use xmtp_cryptography::utils::generate_local_wallet;
use xmtp_proto::xmtp::mls::api::v1::GroupMessage;

use crate::{builder::ClientBuilder, storage::group_message::GroupMessageKind};
use futures::StreamExt;
Expand Down
16 changes: 16 additions & 0 deletions xmtp_mls/src/groups/validated_commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,9 @@ impl From<ValidatedCommit> for GroupMembershipChanges {
mod tests {
use openmls::{
credentials::{BasicCredential, CredentialWithKey},
extensions::ExtensionType,
group::config::CryptoConfig,
prelude::Capabilities,
prelude_test::KeyPackage,
versions::ProtocolVersion,
};
Expand Down Expand Up @@ -500,8 +502,22 @@ mod tests {
let amal_group = amal.create_group(None).unwrap();
let mut amal_mls_group = amal_group.load_mls_group(&amal_provider).unwrap();

let capabilities = Capabilities::new(
None,
Some(&[CIPHERSUITE]),
Some(&[
ExtensionType::LastResort,
ExtensionType::ApplicationId,
ExtensionType::Unknown(0xff11),
ExtensionType::ImmutableMetadata,
]),
None,
None,
);

// Create a key package with a malformed credential
let bad_key_package = KeyPackage::builder()
.leaf_node_capabilities(capabilities)
.build(
CryptoConfig {
ciphersuite: CIPHERSUITE,
Expand Down

0 comments on commit 12e5c51

Please sign in to comment.