Commit graph

41 commits

Author SHA1 Message Date
thorkill
350e2d2d15 merged with guus/1.1 2017-04-28 10:40:50 +02:00
Guus Sliepen
70fed5f7ff Add missing tinc stop command to the scripts test. 2017-04-17 16:05:30 +02:00
Guus Sliepen
a144147319 Fix tests on *BSD. 2017-04-17 14:22:39 +02:00
Guus Sliepen
1be0c284c7 Fix compiler warnings on *BSD. 2017-04-17 13:07:15 +02:00
Guus Sliepen
c87a77b5fd Ensure tests compile on *BSD. 2017-04-17 12:50:30 +02:00
thorkill
557adb0695 Merged new env 2017-04-11 16:09:03 +02:00
Guus Sliepen
d9a7f2d105 Use 127.0.0.1 instead of localhost to ensure tests are reproducible. 2017-03-29 08:08:19 +02:00
Guus Sliepen
3ab1893a4b Ensure proper logging in the invite-offline test. 2017-03-26 17:54:37 +02:00
Guus Sliepen
0af3dcf7a8 Add the scripts test.
This test whether all the scripts are run with the right information in
the right order.
2017-03-26 17:54:30 +02:00
Guus Sliepen
fd3ec60757 Add the invite-offline test.
This tests generating an invitation on the server while no tinc daemon is
running.
2017-03-26 16:47:54 +02:00
Guus Sliepen
5fcf6e16ac Remove superfluous sleep command in invite-join test. 2017-03-26 16:46:31 +02:00
Guus Sliepen
ccb4fb6f7a Use unique ports for all tests. 2017-03-26 16:46:03 +02:00
thorkill
4be26caf4e Merge remote-tracking branch 'guus/1.1' into thkr-foor2Vup 2016-05-08 15:58:29 +02:00
Guus Sliepen
9bd978cc8e Add a test for tinc-up creation from invitations. 2016-04-17 13:56:37 +02:00
thorkill
2d38e37168 Make make dist work when /bin/sh != /bin/bash 2015-07-24 19:14:20 +02:00
thorkill
04c1dedeb5 Extended simple.c with hash and connection tests 2015-07-05 00:32:44 +02:00
thorkill
b342d0cfb6 Added simple connection tests 2015-07-02 22:06:14 +02:00
thorkill
bfea5f350f Added small node test, working on edge tests 2015-07-02 21:33:28 +02:00
thorkill
4b6e956a2d Added first version of cmocka based unittest
To compile the test you will need cmocka installed on system.
Checks in configure.ac are still missing.

$ cd tinc/test/; make simple
to generate testing directory you can use cmocka-simple.sh
$ ./cmocka-simple.sh
‘mocks/conf1’ -> ‘/tmp/tmp.PtS9r796ns/conf1’
To run the test do: cd /tmp/tmp.PtS9r796ns ; ./simple

$ ./simple
[==========] Running 6 test(s).
[ RUN      ] test_edge_init
0 != 0x2
simple.c:73: error: Failure!

[  FAILED  ] test_edge_init
[ RUN      ] test_read_config_file
[       OK ] test_read_config_file
[ RUN      ] test_config_add_item
[       OK ] test_config_add_item
[ RUN      ] test_config_add_item_no_filename
value
simple.c:234: error: Failure!

[  FAILED  ] test_config_add_item_no_filename
[ RUN      ] test_splay_tree_init
[       OK ] test_splay_tree_init
[ RUN      ] test_splay_tree_basic
[       OK ] test_splay_tree_basic
[==========] 6 test(s) run.
[  PASSED  ] 4 test(s).
[  FAILED  ] 2 test(s), listed below:
[  FAILED  ] test_edge_init
[  FAILED  ] test_config_add_item_no_filename

 2 FAILED TEST(S)
2015-07-01 19:46:28 +02:00
thorkill
c67a956351 removed afl atm 2015-06-30 18:48:48 +02:00
thorkill
e9e3811657 Added tests into automake files. 2015-06-30 18:38:48 +02:00
thorkill
ef4a0848ca Merge branch '1.1' of github.com:gsliepen/tinc into thkr-1.1-ponyhof 2015-05-19 17:59:03 +02:00
Sven-Haegar Koch
51b5aab9b0 Fix check for public key in invite-join.test.
Small fix to test/invite-join.test, comparing no-longer-existing
ECDSAPublicKey does not make sense.
2015-05-19 13:30:42 +02:00
thorkill
1c41100737 added test for deadlock scenario while upgrading to 1.1 2015-04-24 22:04:03 +02:00
Sven-Haegar Koch
85000a30ca Fixed variables.test testsuite after 'Make "tinc add" idempotent.' change. 2015-02-10 07:54:52 +01:00
Sven-Haegar Koch
73d8393bd6 commandline.test: Adding test that fetching non-existing config setting really fails. 2014-08-07 23:02:12 +02:00
Guus Sliepen
b0d80c7f28 Allow Cipher and Digest "none".
This is for backwards compatibility with tinc 1.0, it has no effect on
the SPTPS protocol.
2014-05-18 21:51:42 +02:00
Guus Sliepen
2f01744f82 Use Ed25519 keys.
This uses the portable Ed25519 library made by Orson Peters, which in turn uses
the reference implementation made by Daniel J. Bernstein.

This implementation also allows Ed25519 keys to be used for key exchange, so
there is no need to add a separate implementation of Curve25519.
2014-04-06 22:47:26 +02:00
Guus Sliepen
fa1e9b0461 Test two tinc daemons using network namespaces.
Testing multiple daemons connecting to each other on the same computer is
usually difficult, because connections to local IP addresses will bypass most
of the network stack. However, recent versions of Linux support network
namespaces, which can isolate network interfaces. We use this to isolate the
virtual interface of the daemons from each other, so we get the behaviour as if
the daemons were each running on their own machine. This can also be used for
more complicated tests (including those with firewall rules) without disturbing
the real network setup of the host computer.
2014-01-24 16:17:09 +01:00
Guus Sliepen
c25c684a84 Make sure test scripts end up in the tarball. 2013-09-08 14:47:59 +02:00
Guus Sliepen
b80cbaba04 Test running ping through two tinc daemons.
This is a more complicated test with one tinc daemon using a tap interface
(therefore requiring root), and a second one using a multicast interface. A
separate program "pong" is listening on the same multicast address, and waits
for ARP and ICMP packets, responding to ICMP echo packets with replies.
This test doesn't require any configuration of the tap interface.
2013-09-05 17:42:31 +02:00
Guus Sliepen
2faf3e91af Add two more test scripts. 2013-09-05 15:36:37 +02:00
Guus Sliepen
bdbb710060 Add a test for invite and join commands. 2013-09-02 00:15:50 +02:00
Guus Sliepen
566ef6bcba Also test whether tinc daemons can connect to each other after import/export. 2013-09-02 00:15:18 +02:00
Guus Sliepen
4e7e4818b7 Clean up leftover tincd and sptps_test processes. 2013-09-01 22:59:24 +02:00
Guus Sliepen
b00a6d0666 Fix tincd logfile location when running tests. 2013-09-01 21:55:16 +02:00
Guus Sliepen
a4e49f4566 Add test for import, export and exchange commands. 2013-09-01 21:07:02 +02:00
Guus Sliepen
2cd8e2b8e8 Small fixes for tests. 2013-09-01 21:06:25 +02:00
Guus Sliepen
09cd7ac62a Make sptps_test more easy to work with.
It now defers reading from stdin until after the authentication phase is
completed.  Furthermore, it supports the -q, -r, -w options similar to those of
Jürgen Nickelsen's socket.
2013-09-01 16:02:49 +02:00
Guus Sliepen
1cdb0c21d4 Some shells set $_ to an absolute path. 2013-09-01 15:40:59 +02:00
Guus Sliepen
05a7f0b2fb Start of a test suite. 2013-09-01 12:48:31 +02:00