Module test_utils

Source
Available on crate feature test-utils only.
Expand description

Mock discovery support

Structs§

MockDiscovery
Mock discovery node

Enums§

MockCommand
Represents commands for interacting with the MockDiscovery service.
MockEvent
Represents the event types produced by the mock service.

Functions§

create_discv4
Creates a new testing instance for Discv4 and its service
create_discv4_with_config
Creates a new testing instance for Discv4 and its service with the given config.
rng_endpoint
Generates a random NodeEndpoint using the provided random number generator.
rng_ipv4_record
Generates a random IPv4 NodeRecord using the provided random number generator.
rng_ipv6_record
Generates a random IPv6 NodeRecord using the provided random number generator.
rng_message
Generates a random Message using the provided random number generator.
rng_record
Generates a random NodeRecord using the provided random number generator.