mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-05-13 13:39:28 +00:00
Doc Integration tests
This commit is contained in:
parent
7ceb15b763
commit
ea06cf5186
12
core/integration_tests_core/README.md
Normal file
12
core/integration_tests_core/README.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
This crate is dedicated to backend integration tests.
|
||||||
|
|
||||||
|
Tests can be built using any supplied service implementation.
|
||||||
|
Various implementations are available in the `Extensions/components` crate.
|
||||||
|
|
||||||
|
## Running Tests
|
||||||
|
|
||||||
|
Integration tests are executed when running `cargo test` from the workspace folder.
|
||||||
|
|
||||||
|
Alternatively they can be executed from any crate, using
|
||||||
|
|
||||||
|
`cargo test --package integration_tests_core`
|
||||||
@ -1,23 +1 @@
|
|||||||
// use std::ops::{Deref, DerefMut};
|
|
||||||
|
|
||||||
// use components::{EphemeralRegistry, LocalBroadcaster, MemStore};
|
|
||||||
// use libchat::{
|
|
||||||
// AddressedEnvelope, ChatStorage, ContentData, Context, ConversationIdOwned, Introduction,
|
|
||||||
// StorageConfig,
|
|
||||||
// };
|
|
||||||
|
|
||||||
// fn send_and_verify(
|
|
||||||
// sender: &mut Context<LocalBroadcaster, EphemeralRegistry, ChatStorage>,
|
|
||||||
// receiver: &mut Context<LocalBroadcaster, EphemeralRegistry, ChatStorage>,
|
|
||||||
// convo_id: &str,
|
|
||||||
// content: &[u8],
|
|
||||||
// ) {
|
|
||||||
// let payloads = sender.send_content(convo_id, content).unwrap();
|
|
||||||
// let payload = payloads.first().unwrap();
|
|
||||||
// let received = receiver
|
|
||||||
// .handle_payload(&payload.data)
|
|
||||||
// .unwrap()
|
|
||||||
// .expect("expected content");
|
|
||||||
// assert_eq!(content, received.data.as_slice());
|
|
||||||
// assert!(!received.is_new_convo);
|
|
||||||
// }
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user