Skip to content

Commit

Permalink
StagedWelcome Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieobject committed Apr 4, 2024
1 parent 42acd28 commit 5da8e99
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions xmtp_mls/src/groups/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -961,4 +961,47 @@ mod tests {
.await
.is_err(),);
}

#[tokio::test]
async fn test_staged_welcome() {
println!("Begin stub_group_test");

// === Client Creation ===
let amal = ClientBuilder::new_test_client(&generate_local_wallet()).await;
let bola = ClientBuilder::new_test_client(&generate_local_wallet()).await;

// === Dependency Creation ===
let conn = &amal.store.conn().unwrap();
let provider = super::XmtpOpenMlsProvider::new(conn);

// === Amal creates a group ===
let amal_group = amal
.create_group(Some(PreconfiguredPolicies::GroupCreatorIsAdmin))
.unwrap();

// === Amal provider ===
let provider = amal.mls_provider(conn);

// === Amal group triple (WIP) ===
// TODO: Need to fulfill .add_members call site requirements
let (_queued_message, welcome, _group_info) = amal_group
.add_members(provider, &amal_signer, &[bola_kpb.key_package().clone()])

Check failure on line 988 in xmtp_mls/src/groups/mod.rs

View workflow job for this annotation

GitHub Actions / Test

cannot find value `amal_signer` in this scope

Check failure on line 988 in xmtp_mls/src/groups/mod.rs

View workflow job for this annotation

GitHub Actions / Test

cannot find value `bola_kpb` in this scope

Check failure on line 988 in xmtp_mls/src/groups/mod.rs

View workflow job for this annotation

GitHub Actions / Test

this method takes 1 argument but 3 arguments were supplied
.expect("Could not add member to group.");

Check failure on line 989 in xmtp_mls/src/groups/mod.rs

View workflow job for this annotation

GitHub Actions / Test

no method named `expect` found for opaque type `impl futures::Future<Output = std::result::Result<(), GroupError>>` in the current scope

// === Amal join config (WIP) ===

// === Amal Welcome - MlsMessageIN (WIP) ===

// === Amal MlsMessageIN - into_welcome (WIP) ===

// === Stage Bola Group (WIP) ===

// === Staged Bola Group Welcome Sender (WIP) ===

// === Who Added Me Leaf Node Assertion (WIP) ===

// === Bola Group Assertion (WIP) ===

// === Amal / Bola Group Equality Assertion (WIP) ===
}
}

0 comments on commit 5da8e99

Please sign in to comment.