Skip to content
This repository was archived by the owner on Feb 28, 2021. It is now read-only.

Run end_to_end tests sequentially #215

Merged
merged 2 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ Black-box tests for the runtime logic are implemented with the client emulator
in `runtime/tests/main.rs`.

End-to-end tests that run against a real node are implemented in
`client/tests/end_to_end.rs`
`client/tests/end_to_end.rs`.

To run specific tests sequentially as opposed to the parallel default,
we use the [serial-test](https://crates.io/crates/serial_test) crate, simply
having to mark the targeted tests with `#[serial]`.


Changelog
Expand Down
1 change: 1 addition & 0 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ rev = "4c4ee3d5b91c4c825aef4fde2b096f014a89346a"
[dev-dependencies]
rand = "0.7.2"
radicle-registry-test-utils = { path = "../test-utils"}
serial_test = "0.3.2"
4 changes: 4 additions & 0 deletions client/tests/end_to_end.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
//! Note that chain state is shared between the test runs.

use async_std;
use serial_test::serial;

use radicle_registry_client::*;
use radicle_registry_test_utils::*;

#[async_std::test]
#[serial]
async fn register_project() {
let _ = env_logger::try_init();
let node_host = url::Host::parse("127.0.0.1").unwrap();
Expand Down Expand Up @@ -64,6 +67,7 @@ async fn register_project() {
}

#[async_std::test]
#[serial]
/// Submit a transaction with an invalid genesis hash and expect an error.
async fn invalid_transaction() {
let _ = env_logger::try_init();
Expand Down