/// Create a new local fs and install a mock LogSink service into.
/// Returns the created directory and corresponding namespace entries.
Create a new local fs and install a mock LogSink service into.
Returns the created directory and corresponding namespace entries.
Create a new local fs and install a mock LogSink service into . Returns the created directory and corresponding namespace entries .
pub fn create_fs_with_mock_logsink(
) -> Result<(MockServiceFs<'static>, Vec<fcrunner::ComponentNamespaceEntry>), Error> {
    let (client, server) = endpoints::create_endpoints::<DirectoryMarker>()
        .context("Failed to create VFS endpoints.")?;
    let mut dir = ServiceFs::new_local();
    dir.add_fidl_service_at(LogSinkMarker::NAME, MockServiceRequest::LogSink);
    dir.serve_connection(server.into_channel()).context("Failed to add serving channel.")?;
    let entries = vec![fcrunner::ComponentNamespaceEntry {
        path: Some("/svc".to_string()),
        directory: Some(client),
        ..fcrunner::ComponentNamespaceEntry::EMPTY
    }];
    Ok((dir, entries))
}
pub fn create_fs_with_mock_logsink ( ) -> Result < ( MockServiceFs < ' static > , Vec < fcrunner :: ComponentNamespaceEntry > ) , Error > { let ( client , server ) = endpoints :: create_endpoints :: < DirectoryMarker > ( ) . context ( " " ) ? ; let mut dir = ServiceFs :: new_local ( ) ; dir . add_fidl_service_at ( LogSinkMarker :: NAME , MockServiceRequest :: LogSink ) ; dir . serve_connection ( server . into_channel ( ) ) . context ( " " ) ? ; let entries = vec ! [ fcrunner ComponentNamespaceEntry { path Some ( " " to_string ( ) ) directory Some ( client ) fcrunner ComponentNamespaceEntry EMPTY } ] ; Ok ( ( dir , entries ) ) }
Create a new local fs and install a mock LogSink service into.
Create a new local fs and install a mock LogSink service into .