MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / create_test_server

Function create_test_server

api/src/tests.rs:188–203  ·  view source on GitHub ↗

Wrapper around server initialization that handles creating the shutdown handler

(
    node_id: NodeId,
    network: Network,
    interest: I,
    model: Arc<M>,
    p2p: P,
    pipeline: Option<PipelineHandle>,
)

Source from the content-addressed store, hash-verified

186
187/// Wrapper around server initialization that handles creating the shutdown handler
188fn create_test_server<C, I, M, P>(
189 node_id: NodeId,
190 network: Network,
191 interest: I,
192 model: Arc<M>,
193 p2p: P,
194 pipeline: Option<PipelineHandle>,
195) -> Server<C, I, M, P>
196where
197 I: InterestService,
198 M: EventService + 'static,
199 P: P2PService,
200{
201 let shutdown = Shutdown::new();
202 Server::new(node_id, network, interest, model, p2p, pipeline, shutdown)
203}
204
205#[test(tokio::test)]
206async fn create_event() {

Calls 1

newFunction · 0.85

Tested by

no test coverage detected