Module testutil

Source
Expand description

Test Utilities for the fuchsia.net.routes FIDL library.

This library defines a mix of internal and external test utilities, supporting tests of this fidl_fuchsia_net_routes_ext crate and tests of clients of the fuchsia.net.routes FIDL library, respectively.

Modules§

admin
Provides testutils for testing implementations of clients and servers of fuchsia.net.routes.admin.
rules
Provides testutils for testing implementations of clients and servers for routes rules FIDL.

Functions§

empty_watch_event_stream
Provides a stream of watcher events such that the stack appears to contain no routes and never installs any.
fake_watcher_impl
A fake implementation of the WatcherV4 and WatcherV6 protocols.
handle_watch
Responds to the given Watch request with the given batch of events.
serve_state_request
Serve a GetWatcher request to the State protocol by instantiating a watcher client backed by the given event stream. The returned future drives the watcher implementation.