OpenVPN 3 Core Library
Loading...
Searching...
No Matches
unittests Namespace Reference

Classes

class  IpHelperTest
 
class  RouteEmulationTest
 
class  SitnlTest
 
class  TunBuilderMock
 

Functions

static void workload (const uint16_t multiplier)
 
 TEST (CPUTime, cpu_time_pid)
 
void worker_thread (const uint8_t id)
 
void run_threads (const uint8_t num_threads)
 
 TEST (CPUTime, cpu_time_thread_1)
 
 TEST (CPUTime, cpu_time_thread_numcores)
 
 TEST_F (IpHelperTest, TestAddRoute4)
 
 TEST (LogInfoTest, TestLogInfo)
 
 TEST (mbedTLS_x509_get_subject, old_format)
 
 TEST (mbesTLS_x509_get_subject, new_format)
 
 TEST (mbedTLS_x509_get_common_name, basic_check)
 
 TEST (OpenSSL_X509_get_subject, old_format)
 
 TEST (OpenSSL_X509_get_subject, new_format)
 
 TEST (OpenSSL_X509_get_serial, numeric)
 
 TEST (OpenSSL_X509_get_serial, hexadecimal)
 
 TEST (OpenSSL_X509_get_field, basic_checks)
 
 TEST (OpenSSL_X509_get_field, signature)
 
 TEST (x509_get_fingerprint, output)
 
 TEST (PeerFingerprint, parse_config)
 
 TEST (PeerFingerprint, malformed)
 
 TEST (PeerFingerprint, stringify)
 
 TEST (PeerFingerprint, match_empty)
 
 TEST (PeerFingerprint, match)
 
 TEST (PeerFingerprint, no_match)
 
std::string join_string_vector_sorted (std::vector< std::string > vec, const char *const delim=", ")
 
 TEST_F (RouteEmulationTest, ExcludeOneSubnet)
 
 TEST_F (RouteEmulationTest, ExcludeSubnetsNoDefault)
 
 TEST_F (RouteEmulationTest, excludeServer)
 
 TEST_F (RouteEmulationTest, nestedIPRoutes)
 
 TEST_F (RouteEmulationTest, DefaultRoute)
 
 TEST_F (SitnlTest, TestAddrAdd4)
 
 TEST_F (SitnlTest, TestAddrAdd6)
 
 TEST_F (SitnlTest, TestSetMTU)
 
 TEST_F (SitnlTest, TestAddRoute4)
 
 TEST_F (SitnlTest, TestAddRoute6)
 
 TEST_F (SitnlTest, TestBestGw4)
 
 TEST_F (SitnlTest, TestBestGw4FilterIface)
 
OptionList parse_testcfg (std::string &config)
 
 TEST (VerifyX509Name, config_missing_args)
 
 TEST (VerifyX509Name, config_incorrect_type)
 
 TEST (VerifyX509Name, config_correct_default_type)
 
 TEST (VerifyX509Name, config_correct_subject)
 
 TEST (VerifyX509Name, config_correct_name)
 
 TEST (VerifyX509Name, config_squote)
 
 TEST (VerifyX509Name, config_correct_name_prefix)
 
 TEST (VerifyX509Name, test_subject)
 
 TEST (VerifyX509Name, test_name)
 
 TEST (VerifyX509Name, test_name_prefix)
 

Variables

static std::string path_to_ip
 
std::string test_cert
 
std::vector< uint8_t > test_fingerprint
 
static std::string path_to_ip
 

Function Documentation

◆ join_string_vector_sorted()

std::string unittests::join_string_vector_sorted ( std::vector< std::string >  vec,
const char *const  delim = ", " 
)

Definition at line 26 of file test_route_emulation.cpp.

◆ parse_testcfg()

OptionList unittests::parse_testcfg ( std::string &  config)

Definition at line 25 of file test_verify_x509_name.cpp.

Here is the caller graph for this function:

◆ run_threads()

void unittests::run_threads ( const uint8_t  num_threads)

Definition at line 165 of file test_cpu_time.cpp.

Here is the caller graph for this function:

◆ TEST() [1/30]

unittests::TEST ( CPUTime  ,
cpu_time_pid   
)

Definition at line 110 of file test_cpu_time.cpp.

◆ TEST() [2/30]

unittests::TEST ( CPUTime  ,
cpu_time_thread_1   
)

Definition at line 183 of file test_cpu_time.cpp.

◆ TEST() [3/30]

unittests::TEST ( CPUTime  ,
cpu_time_thread_numcores   
)

Definition at line 203 of file test_cpu_time.cpp.

◆ TEST() [4/30]

unittests::TEST ( LogInfoTest  ,
TestLogInfo   
)

Definition at line 32 of file test_log.cpp.

◆ TEST() [5/30]

unittests::TEST ( mbedTLS_x509_get_common_name  ,
basic_check   
)

Definition at line 81 of file test_mbedtls_x509certinfo.cpp.

◆ TEST() [6/30]

unittests::TEST ( mbedTLS_x509_get_subject  ,
old_format   
)

Definition at line 60 of file test_mbedtls_x509certinfo.cpp.

◆ TEST() [7/30]

unittests::TEST ( mbesTLS_x509_get_subject  ,
new_format   
)

Definition at line 71 of file test_mbedtls_x509certinfo.cpp.

◆ TEST() [8/30]

unittests::TEST ( OpenSSL_X509_get_field  ,
basic_checks   
)

Definition at line 97 of file test_openssl_x509certinfo.cpp.

◆ TEST() [9/30]

unittests::TEST ( OpenSSL_X509_get_field  ,
signature   
)

Definition at line 118 of file test_openssl_x509certinfo.cpp.

◆ TEST() [10/30]

unittests::TEST ( OpenSSL_X509_get_serial  ,
hexadecimal   
)

Definition at line 89 of file test_openssl_x509certinfo.cpp.

◆ TEST() [11/30]

unittests::TEST ( OpenSSL_X509_get_serial  ,
numeric   
)

Definition at line 81 of file test_openssl_x509certinfo.cpp.

◆ TEST() [12/30]

unittests::TEST ( OpenSSL_X509_get_subject  ,
new_format   
)

Definition at line 71 of file test_openssl_x509certinfo.cpp.

◆ TEST() [13/30]

unittests::TEST ( OpenSSL_X509_get_subject  ,
old_format   
)

Definition at line 60 of file test_openssl_x509certinfo.cpp.

◆ TEST() [14/30]

unittests::TEST ( PeerFingerprint  ,
malformed   
)

Definition at line 71 of file test_peer_fingerprint.cpp.

◆ TEST() [15/30]

unittests::TEST ( PeerFingerprint  ,
match   
)

Definition at line 136 of file test_peer_fingerprint.cpp.

◆ TEST() [16/30]

unittests::TEST ( PeerFingerprint  ,
match_empty   
)

Definition at line 127 of file test_peer_fingerprint.cpp.

◆ TEST() [17/30]

unittests::TEST ( PeerFingerprint  ,
no_match   
)

Definition at line 152 of file test_peer_fingerprint.cpp.

◆ TEST() [18/30]

unittests::TEST ( PeerFingerprint  ,
parse_config   
)

Definition at line 29 of file test_peer_fingerprint.cpp.

◆ TEST() [19/30]

unittests::TEST ( PeerFingerprint  ,
stringify   
)

Definition at line 119 of file test_peer_fingerprint.cpp.

◆ TEST() [20/30]

unittests::TEST ( VerifyX509Name  ,
config_correct_default_type   
)

Definition at line 55 of file test_verify_x509_name.cpp.

◆ TEST() [21/30]

unittests::TEST ( VerifyX509Name  ,
config_correct_name   
)

Definition at line 71 of file test_verify_x509_name.cpp.

◆ TEST() [22/30]

unittests::TEST ( VerifyX509Name  ,
config_correct_name_prefix   
)

Definition at line 86 of file test_verify_x509_name.cpp.

◆ TEST() [23/30]

unittests::TEST ( VerifyX509Name  ,
config_correct_subject   
)

Definition at line 63 of file test_verify_x509_name.cpp.

◆ TEST() [24/30]

unittests::TEST ( VerifyX509Name  ,
config_incorrect_type   
)

Definition at line 47 of file test_verify_x509_name.cpp.

◆ TEST() [25/30]

unittests::TEST ( VerifyX509Name  ,
config_missing_args   
)

Definition at line 40 of file test_verify_x509_name.cpp.

◆ TEST() [26/30]

unittests::TEST ( VerifyX509Name  ,
config_squote   
)

Definition at line 78 of file test_verify_x509_name.cpp.

◆ TEST() [27/30]

unittests::TEST ( VerifyX509Name  ,
test_name   
)

Definition at line 122 of file test_verify_x509_name.cpp.

◆ TEST() [28/30]

unittests::TEST ( VerifyX509Name  ,
test_name_prefix   
)

Definition at line 132 of file test_verify_x509_name.cpp.

◆ TEST() [29/30]

unittests::TEST ( VerifyX509Name  ,
test_subject   
)

Definition at line 93 of file test_verify_x509_name.cpp.

◆ TEST() [30/30]

unittests::TEST ( x509_get_fingerprint  ,
output   
)

Definition at line 125 of file test_openssl_x509certinfo.cpp.

◆ TEST_F() [1/13]

unittests::TEST_F ( IpHelperTest  ,
TestAddRoute4   
)

Definition at line 48 of file test_iphelper.cpp.

◆ TEST_F() [2/13]

unittests::TEST_F ( RouteEmulationTest  ,
DefaultRoute   
)

Definition at line 265 of file test_route_emulation.cpp.

◆ TEST_F() [3/13]

unittests::TEST_F ( RouteEmulationTest  ,
ExcludeOneSubnet   
)

Definition at line 146 of file test_route_emulation.cpp.

◆ TEST_F() [4/13]

unittests::TEST_F ( RouteEmulationTest  ,
excludeServer   
)

Definition at line 185 of file test_route_emulation.cpp.

◆ TEST_F() [5/13]

unittests::TEST_F ( RouteEmulationTest  ,
ExcludeSubnetsNoDefault   
)

Definition at line 159 of file test_route_emulation.cpp.

◆ TEST_F() [6/13]

unittests::TEST_F ( RouteEmulationTest  ,
nestedIPRoutes   
)

Definition at line 208 of file test_route_emulation.cpp.

◆ TEST_F() [7/13]

unittests::TEST_F ( SitnlTest  ,
TestAddrAdd4   
)

Definition at line 168 of file test_sitnl.cpp.

◆ TEST_F() [8/13]

unittests::TEST_F ( SitnlTest  ,
TestAddrAdd6   
)

Definition at line 183 of file test_sitnl.cpp.

◆ TEST_F() [9/13]

unittests::TEST_F ( SitnlTest  ,
TestAddRoute4   
)

Definition at line 209 of file test_sitnl.cpp.

◆ TEST_F() [10/13]

unittests::TEST_F ( SitnlTest  ,
TestAddRoute6   
)

Definition at line 234 of file test_sitnl.cpp.

◆ TEST_F() [11/13]

unittests::TEST_F ( SitnlTest  ,
TestBestGw4   
)

Definition at line 278 of file test_sitnl.cpp.

◆ TEST_F() [12/13]

unittests::TEST_F ( SitnlTest  ,
TestBestGw4FilterIface   
)

Definition at line 308 of file test_sitnl.cpp.

◆ TEST_F() [13/13]

unittests::TEST_F ( SitnlTest  ,
TestSetMTU   
)

Definition at line 196 of file test_sitnl.cpp.

◆ worker_thread()

void unittests::worker_thread ( const uint8_t  id)

Definition at line 131 of file test_cpu_time.cpp.

◆ workload()

static void unittests::workload ( const uint16_t  multiplier)
static

Definition at line 88 of file test_cpu_time.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ path_to_ip [1/2]

std::string unittests::path_to_ip
static

Definition at line 24 of file test_iphelper.cpp.

◆ path_to_ip [2/2]

std::string unittests::path_to_ip
static

Definition at line 28 of file test_sitnl.cpp.

◆ test_cert

std::string unittests::test_cert

Definition at line 26 of file test_mbedtls_x509certinfo.cpp.

◆ test_fingerprint

std::vector<uint8_t> unittests::test_fingerprint
Initial value:
= {
0x44, 0xF5, 0xA6, 0x4D, 0x4A, 0xCB, 0x65, 0xE1, 0x8A, 0x9F, 0x55, 0x89, 0x7F, 0x77, 0xA0, 0x79,
0xAA, 0xFB, 0xCC, 0xA1, 0x37, 0x2F, 0xD8, 0xB3, 0x47, 0xAA, 0x9D, 0xE3, 0xD0, 0x76, 0xB1, 0x44
}

Definition at line 22 of file test_peer_fingerprint.cpp.