Nick Mathewson
945d871da5
Merge branch 'maint-0.3.3'
2018-06-14 12:50:26 -04:00
Nick Mathewson
ee860b8f37
squash! Make sure that the test_rust.sh script fails when a test fails
...
Also make sure that we're actually running the test from within the right
cwd, like we do when we're building. This seems necessary to avoid
an error when running offline.
Amusingly, it appears that we had this bug before: we just weren't
noticing it, because of bug 26258.
2018-06-13 12:21:25 -04:00
rl1987
b7fae0f48c
Heed --disable-unittests properly
2018-06-02 12:53:04 +03:00
Nick Mathewson
f684b48b5b
Merge branch 'ticket26009'
2018-05-09 14:01:08 -04:00
Nick Mathewson
d14c245a0f
Add unit test for ..get_start_of_next_voting_interval().
...
This functionality was covered only accidentally by our voting-test
code, and as such wasn't actually tested at all. The tests that
called it made its coverage nondeterministic, depending on what time
of day you ran the tests.
Closes ticket 26014.
2018-05-06 20:42:18 -04:00
Nick Mathewson
1d16b7124f
Basic unit tests for update_current_time().
...
This function is about to get more complicated, so we should track
how it's working.
2018-05-03 12:02:10 -04:00
David Goulet
9fd319168b
test: Add missing geoip_dummy file to EXTRA_DIST
...
Needed to run tests from the tarball else the geoip unit test would fail by
not finding that file.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-26 14:15:24 -04:00
David Goulet
665e23c59a
test: Add periodic events unit tests
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-23 10:57:28 -04:00
Nick Mathewson
b152d62cee
Merge branch 'token_bucket_refactor_squashed'
2018-04-13 10:47:24 -04:00
Nick Mathewson
c376200f6a
Add a new token-bucket backend abstraction, with tests
...
This differs from our previous token bucket abstraction in a few
ways:
1) It is an abstraction, and not a collection of fields.
2) It is meant to be used with monotonic timestamps, which should
produce better results than calling gettimeofday over and over.
2018-04-13 10:41:14 -04:00
Nick Mathewson
6bdfaa8b24
Merge remote-tracking branch 'isis-github/bug25425_squashed2'
2018-04-10 15:32:26 -04:00
Isis Lovecruft
c2c5b13e5d
test: Add testing module and some unittests for bridges.c.
...
This roughly doubles our test coverage of the bridges.c module.
* ADD new testing module, .../src/test/test_bridges.c.
* CHANGE a few function declarations from `static` to `STATIC`.
* CHANGE one function in transports.c, transport_get_by_name(), to be
mockable.
* CLOSES #25425 : https://bugs.torproject.org/25425
2018-04-09 19:32:46 +00:00
Nick Mathewson
c6d7e0becf
Merge remote-tracking branch 'public/split_relay_crypto'
2018-04-05 12:12:18 -04:00
Nick Mathewson
7db4d0c55f
Basic unit tests for relay_crypto.c
...
These tests handle incoming and outgoing cells on a three-hop
circuit, and make sure that the crypto works end-to-end. They don't
yet test spec conformance, leaky-pipe, or various error cases.
2018-03-24 13:49:08 -04:00
Nick Mathewson
11114c7e83
Merge branch 'maint-0.3.3'
2018-03-23 11:19:19 -04:00
Isis Lovecruft
657d5cbbbc
tests: Automatically detect Rust crates to test and also pass --verbose.
...
* FIXES #25560 : https://bugs.torproject.org/25560 .
2018-03-23 11:13:04 -04:00
Nick Mathewson
ffb00404b1
Split geoip tests into a separate module.
2018-03-15 15:12:54 +01:00
Nick Mathewson
9e566f3a72
Merge branch 'tests_rust'
2018-02-13 18:12:01 -05:00
Nick Mathewson
abdf2a6f7f
Merge remote-tracking branch 'dgoulet/ticket24902_029_05'
2018-02-09 12:08:12 -05:00
Nick Mathewson
549a450f52
Add a "make test-rust" target to run the rust tests only.
2018-02-08 17:51:57 -05:00
David Goulet
112638921b
Merge branch 'ticket25183_029_01' into ticket24902_029_05
2018-02-08 16:56:21 -05:00
David Goulet
a445327b80
test: Add unit tests for addressset.c
...
This also adds one that tests the integration with the nodelist.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-02-08 16:56:05 -05:00
David Goulet
cd81403cc0
Merge branch 'ticket24902_029_05' into ticket24902_033_02
2018-01-30 09:33:12 -05:00
George Kadianakis
c3c2b55dec
test: Add unit tests for the DoS subsystem
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-30 09:18:16 -05:00
Nick Mathewson
0340c02975
Merge remote-tracking branch 'mikeperry/bug23114_squashed2'
2017-12-08 17:50:34 -05:00
Mike Perry
050bb67974
Add tests for circuitstats.c
...
These tests primarily test the relaxed and measured behavior of
circuitstats.c, to make sure we did not break it with #23100 or #23114 .
2017-12-07 00:04:39 +00:00
David Goulet
9c6560fe29
test: Add HS_DESC v3 unit tests
...
This introduces the test_hs_control.c file which at this commit contains basic
unit test for the HS_DESC event.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-12-05 19:39:46 -05:00
Nick Mathewson
f865993653
Merge branch 'maint-0.3.2'
2017-11-02 10:26:30 -04:00
teor
27ea6fcd31
Test that IPv6-only clients can use microdescriptors
...
When running "make test-network-all", test that IPv6-only clients can use
microdescriptors. IPv6-only microdescriptor client support was fixed in
tor 0.3.0.1-alpha.
Requires chutney master 61c28b9 or later.
Closes ticket 24109.
2017-11-02 10:25:49 -04:00
Nick Mathewson
a46dcc0709
Merge branch 'maint-0.3.2'
2017-11-02 10:22:35 -04:00
teor
176bfe1bed
Don't run IPv6-only v3 single onion service tests using chutney
...
Part of #23820 .
2017-11-02 10:19:05 -04:00
Nick Mathewson
f5e9e2748f
Merge branch 'protover-rust-impl_squashed'
2017-10-27 10:05:30 -04:00
Chelsea Holland Komlo
91bca5c31b
move to allocating c strings from rust
2017-10-27 10:02:08 -04:00
Nick Mathewson
594cf92498
Merge branch 'feature18329_029_squashed' into maint-0.3.2
2017-10-24 19:35:28 -04:00
Isis Lovecruft
02cde0d939
test: Add unittest for descriptors with BridgeDistribution option.
2017-10-24 19:26:24 -04:00
Nick Mathewson
f21102c069
Let's get 100% coverage for proto_http while we're at it.
...
There was some coverage before, but it was mostly accidental.
2017-09-27 21:45:55 -04:00
Nick Mathewson
b8b016940d
Add unit tests for var_cell and control0 proto functions.
2017-09-27 09:09:00 -04:00
David Goulet
75ec72f24d
test: Unit test for the hs indexes
...
Using a test vector in python, test both hs_build_hsdir_index() and
hs_build_hs_index().
This commit also adds the hs_build_address.py to EXTRA_DIST which was missing.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-09-15 12:46:26 +03:00
teor
d7d8d2c20e
Add v3 hidden service support to make test-network-all
...
Requires chutney master 50f64ea or later.
Implements ticket 22437.
2017-09-12 17:08:28 +10:00
Nick Mathewson
ee73c1848e
Add test_hs_descriptor.inc to include.am to unbreak distcheck.
2017-08-23 13:08:59 -04:00
Ties Stuij
2e99f839e9
22839: Build tor with rust enabled on win
...
- make tor_util static library name configurable
- fix Rust libary dependency order for Windows
2017-08-21 15:08:24 -04:00
Nick Mathewson
34e4122025
Merge branch 'ticket20657_nickm_bugfixes_squashed'
2017-08-08 20:31:57 -04:00
David Goulet
8ffb49422b
test: Add test_hs_common unit tests
...
Move tests from test_hs_service.c to this file.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08 20:29:34 -04:00
David Goulet
6061f5e2bd
test: Add test_hs_ntor unit tests
...
Move the ntor test from test_hs_service.c to this file.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08 20:29:34 -04:00
David Goulet
472835d6e9
test: Add test_hs_cell unit tests
...
Move ESTABLISH_INTRO tests from test_hs_service.c to this new file.
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-08-08 20:29:33 -04:00
Isis Lovecruft
b2a7e8df90
routerkeys: Add cmdline option for learning signing key expiration.
...
* CLOSES #17639 .
* ADDS new --key-expiration commandline option which prints when the
signing key expires.
2017-08-03 22:20:02 +00:00
David Goulet
93774dcb54
test: Add HS v2 service configuration unit tests
...
Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-07-13 16:49:08 -04:00
George Kadianakis
173dd486e3
test: Add client-side unittests for e2e rend circuits.
2017-07-07 11:12:26 -04:00
George Kadianakis
dc3a2037f5
test: Move some test code to test helpers.
...
Move code to create connection streams and rend_data structures to
test_helpers so that we can use them from the e2e rendezvous circuit
unittests.
2017-07-07 11:12:26 -04:00
Nick Mathewson
69ef94820b
Merge branch 'add_rust_squashed'
2017-05-19 08:47:18 -04:00