From e66b7c38f4711b075aab9262c70012b11780df0f Mon Sep 17 00:00:00 2001 From: onyinyang Date: Mon, 4 Apr 2022 13:22:51 -0400 Subject: [PATCH] Fixed testing instructions and another substring issue --- crates/lox-library/README.md | 37 ++++++++++++++++++++++++++------- crates/lox-library/src/tests.rs | 4 ++-- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/crates/lox-library/README.md b/crates/lox-library/README.md index b77d5f3..f3cc566 100644 --- a/crates/lox-library/README.md +++ b/crates/lox-library/README.md @@ -3,15 +3,38 @@ Lox is a reputation-based bridge distribution system that provides privacy protection to users and their social graph and is open to all users. Lox is written in rust and requires `cargo` to test. [Install Rust](https://www.rust-lang.org/tools/install) -### To run the tests used for our experimental results: +### To run the tests used for our experimental results run: ``` -cargo test --release -- --nocapture stats_test > stats_test.log +cargo test --release -- --nocapture TESTNAME ``` + +Where TESTNAME is one of: + +``` +stats_test_trust_levels +stats_test_invitations +stats_test_percent_blockage_migration_05 +stats_test_percent_blockage_migration_010 +stats_test_percent_blockage_migration_15 +stats_test_percent_blockage_migration_20 +stats_test_percent_blockage_migration_25 +stats_test_percent_blockage_migration_30 +stats_test_percent_blockage_migration_35 +stats_test_percent_blockage_migration_40 +stats_test_percent_blockage_migration_45 +stats_test_percent_blockage_migration_50 +stats_test_percent_blockage_migration_55 +stats_test_percent_blockage_migration_60 +stats_test_percent_blockage_migration_65 +stats_test_percent_blockage_migration_70 +stats_test_percent_blockage_migration_75 +stats_test_percent_blockage_migration_80 +stats_test_percent_blockage_migration_85 +stats_test_percent_blockage_migration_90 +stats_test_percent_blockage_migration_95 +stats_test_percent_blockage_migration_100 +``` + Note that: our implementation is coded such that the reachability certificate expires at 00:00 UTC. A workaround has been included in each test to pause if it is too close to this time so the request won't fail. In reality, if the bucket is still reachable, a user could simply request a new reachability token if their request fails for this reason (a new certificate should be available prior to the outdated certificate expiring). -### To run all Lox tests: - -``` -cargo test --release -- --nocapture test > testing.log -``` diff --git a/crates/lox-library/src/tests.rs b/crates/lox-library/src/tests.rs index ace57db..1766ed4 100644 --- a/crates/lox-library/src/tests.rs +++ b/crates/lox-library/src/tests.rs @@ -919,7 +919,7 @@ fn stats_test_invitations() { } #[test] -fn stats_test_percent_blockage_migration_5() { +fn stats_test_percent_blockage_migration_05() { let buckets: Vec = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500]; for x in buckets { @@ -952,7 +952,7 @@ fn stats_test_percent_blockage_migration_5() { } #[test] -fn stats_test_percent_blockage_migration_10() { +fn stats_test_percent_blockage_migration_010() { let buckets: Vec = vec![150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500]; for x in buckets {