0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 20:13:05 +02:00
Commit Graph

66 Commits

Author SHA1 Message Date
Arne Schwabe
bd663fd77f [test/misc] Disable unix only unit tests on windows
- Move misc tempfile test that requires unix to misc_unix test

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
c249d13547 [test/misc] Convert time tests to unit tests
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
bbb00aa932 [test/misc] Convert pktid test to unit test
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
a3d1e3b51e [test/misc] Convert misc/path to unit test
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
aec6ba3b71 [test/misc] Convert hashstr to unit test
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
ce9bd51f72 [test/misc] Convert test/pool to unit test
Rename test_icmp6csum to test_ip to collect all small ip related tests

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
abbc91ca62 [test/misc] Convert port_offset to unit test
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
8dbcd541c7 [test/misc] Convert test_timeskew.cpp to unit test
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
141e71020a [test/misc] Convert session/token related tests to unit tests
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
a1d2e8d8a1 [test/misc] Covert skmove into unit test
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
f2eb9e52f3 [test/misc] Convert parseargv to unit test
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
ea2640fed3 [test/misc] Fix unit tests on Windows
- use platform independent random instead DevURand
- use pipe only on Unix

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
f62f73aa39 [test/misc] Convert capture test to unit test
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
fc719040d7 [test/misc] Convert misc/rc to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
ecb75b3644 [test/misc] Convert misc/route to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
3bedfb5458 [test/misc] Convert misc/static_key.cpp to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
7626d69345 [test/misc] Convert misc/cleanup.cpp to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
58875e8ff4 [test/misc] Convert icmp6csum to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
4a82cfd984 [test/misc] Convert format.cpp to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
0634043550 [test/misc] Convert prefix length test to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
482950fe3d [test/misc] Convert testpipe into unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
f2cfd225ba [test/misc] Convert streq test to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
775f1313a2 [test/misc] Convert token encrypt test to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
fffcb8083a [test/misc] Convert validate_creds test to unittests
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
59084a962e [test/misc] Convert IP checksum test to unittest
Lower amount of round from 10 million to 1 million since the test
will now be run every time and otherwise takes 20s

Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
Arne Schwabe
4ea420ad01 [test/misc] Convert OpenSSL PKI test to unittest
Signed-off-by: Arne Schwabe <arne@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
dccfd5bc09 [test/misc] testing: added jytest unit test wrapper
See test/jytest/README.txt for documentation.

Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
bba08fff25 [test/misc] tests: updated test/misc/sess_id.cpp to use the new conflict parameter added to SessionIDType::find_weak()
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
168541a039 [test/misc] tests: moved misc/certcrl.cpp into test/openssl_pki and expanded its function
test/openssl_pki/pkitest.cpp (formerly moved misc/certcrl.cpp)
is an attempt to more fully test the OpenSSL PKI wrappers.

Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
8a5ce39bf1 [test/misc] tests: added streq.cpp
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
0d75d41189 [test/misc] tests: added test for path::is_contained()
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
564b0dfcba [test/misc] tests: extended route.cpp test for new IPv4/v6-specialized RouteType
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
3e6b46ff78 [test/misc] Added IP checksum functions with support for partial checksums
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
bfbb523568 [test/misc] tests: updated validatecreds.cpp for core changes
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
ea1057b56c [test/misc] tests: updated route.cpp to test std::set<IP::Route>
Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
994ea2e411 [test/misc] tests: in static_key.cpp, added test for randomly
generated StaticKey.

Signed-off-by: James Yonan <james@openvpn.net>
2022-07-01 15:57:30 +02:00
James Yonan
73f4420878 [test/misc] new tests: b64count, cookie, refscope, refscope1, sess_id,
sidasm, stat, statatomic, and strtempl.
2022-07-01 15:57:30 +02:00
James Yonan
9acd1feae6 [test/misc] tests : in path, test new varargs join() 2022-07-01 15:57:30 +02:00
James Yonan
cef5dc8aa4 [test/misc] tests : updated capture.cpp for new metric parameter passed
to tun_builder_(add|exclude)_route.
2022-07-01 15:57:30 +02:00
James Yonan
648c9a6fe3 [test/misc] Tests:
* Added hashstr and unicode1.

* Updated base64 to properly detect issues converting
  to/from utf-8 strings.

* In go script, NOSSL=1 must accompany PSSL=1 on Linux.
2022-07-01 15:57:30 +02:00
James Yonan
1fb59fb1eb [test/misc] Added test for OptionList::parse_from_argv_static(). 2022-07-01 15:57:30 +02:00
James Yonan
be72abb286 [test/misc] Added credential validation test in test/misc/validatecreds.cpp 2022-07-01 15:57:30 +02:00
James Yonan
aa75d6aaed [test/misc] Added misc tests:
* postcall.cpp -- demonstrate asio inter-thread messaging
* rcspeed.cpp -- test speed of various RC flavors

Fixed test/misc/rc.cpp so it builds/runs.
2022-07-01 15:57:30 +02:00
James Yonan
6c2babf73b [test/misc] Added tests for classes Stop and Cleanup. 2022-07-01 15:57:30 +02:00
James Yonan
4e85ec0722 [test/misc] Added test/misc/capture.cpp for testing new to_json() and
from_json() methods in TunBuilderCapture.
2022-07-01 15:57:30 +02:00
James Yonan
56cdfe6b00 [test/misc] Misc test code additions/changes:
expr.cpp -- test Macro::BooleanExpression
macro.cpp -- test Macro parsing and representation
uniter.cpp -- test Unicode::UTF8Iterator
format.cpp -- test minor changes to printfmt()
unused/comment_out.hpp -- unused code that comments
                          out a multiline string.
2022-07-01 15:57:30 +02:00
James Yonan
319250f33e [test/misc] Added code to test new format.hpp methods. 2022-07-01 15:57:30 +02:00
James Yonan
96578014b2 [test/misc] Added test for new packet ID code. 2022-07-01 15:57:30 +02:00
James Yonan
5d047d9ecd [test/misc] Added code to test/misc/rc.cpp to test dynamic_pointer_cast<>(). 2022-07-01 15:57:30 +02:00
James Yonan
21571c4d23 [test/misc] Added tests for RCWeak release notification callables. 2022-07-01 15:57:30 +02:00