-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move mobile verifier integration tests to single file Reading about dead code problems in tests, multiple people pointed to this blog post. https://matklad.github.io/2021/02/27/delete-cargo-integration-tests.html The issue is, cargo compiles a single binary for each test suite. When you try to share code across suites, the checking is done at a per-suite level. For example, you have: - commons/mod.rs - one.rs - two.rs ``` pub fn shared_fn() {} ``` If only one.rs uses `shared_fn()`, cargo test will complain that it's unused, because it's not used in all created binaries. Moving all the test modules into a `integrations/main.rs` forces a single binary to be compiled, which has the same type of dead code checking as a regular application. * move boost manager integration tests to single file * remove `#[allow(dead_code)]` * move iot verifier tests to single file - remove `#[allow(dead_code)]` * remove unused mock receiver
- Loading branch information
1 parent
5816910
commit 43d5a56
Showing
26 changed files
with
80 additions
and
113 deletions.
There are no files selected for viewing
1 change: 0 additions & 1 deletion
1
boost_manager/tests/activator_tests.rs → ...ger/tests/integrations/activator_tests.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
mod common; | ||
|
||
mod activator_tests; | ||
mod purger_tests; | ||
mod updater_tests; | ||
mod watcher_tests; |
1 change: 0 additions & 1 deletion
1
boost_manager/tests/purger_tests.rs → ...anager/tests/integrations/purger_tests.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
mod common; | ||
use boost_manager::purger; | ||
use boost_manager::OnChainStatus; | ||
use chrono::{DateTime, Duration, Utc}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 3 additions & 36 deletions
39
boost_manager/tests/watcher_tests.rs → ...nager/tests/integrations/watcher_tests.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mod common; | ||
|
||
mod purger_tests; | ||
mod rewarder_operations; | ||
mod rewarder_oracles; | ||
mod rewarder_poc_dc; | ||
mod runner_tests; |
2 changes: 1 addition & 1 deletion
2
iot_verifier/tests/purger_tests.rs → ...rifier/tests/integrations/purger_tests.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
iot_verifier/tests/rewarder_operations.rs → ...tests/integrations/rewarder_operations.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
iot_verifier/tests/rewarder_oracles.rs → ...er/tests/integrations/rewarder_oracles.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
iot_verifier/tests/rewarder_poc_dc.rs → ...ier/tests/integrations/rewarder_poc_dc.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
iot_verifier/tests/runner_tests.rs → ...rifier/tests/integrations/runner_tests.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
mobile_verifier/tests/boosting_oracles.rs → ...er/tests/integrations/boosting_oracles.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
mod common; | ||
use crate::common; | ||
use anyhow::Context; | ||
use chrono::{DateTime, Duration, Utc}; | ||
use file_store::{ | ||
|
Oops, something went wrong.