OpenVPN 3 Core Library
Loading...
Searching...
No Matches
rc::helpers Namespace Reference

Functions

auto genHost (const bool valid=true) -> Gen< std::string >
 Generates a host string.
 
auto genDnsServerSecurity () -> Gen< openvpn::DnsServer::Security >
 Generates random DNS server security settings.
 
auto genDnsServerTransport () -> Gen< openvpn::DnsServer::Transport >
 Generates random DNS server transport.
 

Function Documentation

◆ genDnsServerSecurity()

auto rc::helpers::genDnsServerSecurity ( ) -> Gen<openvpn::DnsServer::Security>
inline

Generates random DNS server security settings.

Creates a generator that produces random values from the openvpn::DnsServer::Security enumeration. The generated values can be one of: Unset, No, Yes, or Optional.

Returns
A generator that yields random openvpn::DnsServer::Security enum values.

Definition at line 717 of file test_generators.hpp.

Here is the caller graph for this function:

◆ genDnsServerTransport()

auto rc::helpers::genDnsServerTransport ( ) -> Gen<openvpn::DnsServer::Transport>
inline

Generates random DNS server transport.

Creates a generator that produces random values from the openvpn::DnsServer::Transport enumeration. The generator yields one of: Unset, Plain, HTTPS, or TLS.

Returns
A generator that yields random openvpn::DnsServer::Transport enum values.

Definition at line 732 of file test_generators.hpp.

Here is the caller graph for this function:

◆ genHost()

auto rc::helpers::genHost ( const bool  valid = true) -> Gen<std::string>
inline

Generates a host string.

Creates a string based on the input parameter. Valid hosts conform to length constraints (between HOST_MIN_LENGTH and HOST_MAX_LENGTH characters) and contain only allowed characters. Invalid hosts may exceed the maximum length or contain invalid characters.

Parameters
validIf true (default), the function will generally produce valid host strings If false, the function will deliberately generate invalid host strings.
Returns
A generator for host strings with the specified validity characteristics.
Note
This generator does not produce meaningful hosts, just string with valid length and from allowed characters

Definition at line 697 of file test_generators.hpp.

Here is the caller graph for this function: