Skip to content

Commit 8acb0b9

Browse files
committed
refactor tests to conform to 'new style'
1 parent 9739620 commit 8acb0b9

File tree

9 files changed

+15
-20
lines changed

9 files changed

+15
-20
lines changed

gix-protocol/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ async-client = [
3737
serde = ["dep:serde", "bstr/serde", "gix-transport/serde", "gix-hash/serde"]
3838

3939
[[test]]
40-
name = "blocking-client-protocol"
40+
name = "blocking"
4141
path = "tests/blocking-protocol.rs"
4242
required-features = ["blocking-client"]
4343

4444
[[test]]
45-
name = "async-client-protocol"
45+
name = "async"
4646
path = "tests/async-protocol.rs"
4747
required-features = ["async-client"]
4848

gix-protocol/tests/async-protocol.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
1-
type Result = std::result::Result<(), Box<dyn std::error::Error>>;
2-
3-
pub fn fixture_bytes(path: &str) -> Vec<u8> {
4-
std::fs::read(std::path::PathBuf::from("tests").join("fixtures").join(path))
5-
.expect("fixture to be present and readable")
6-
}
7-
8-
mod fetch;
9-
mod remote_progress;
1+
mod protocol;
2+
pub use protocol::*;
Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,2 @@
1-
type Result = std::result::Result<(), Box<dyn std::error::Error>>;
2-
3-
pub fn fixture_bytes(path: &str) -> Vec<u8> {
4-
std::fs::read(std::path::PathBuf::from("tests").join("fixtures").join(path))
5-
.expect("fixture to be present and readable")
6-
}
7-
8-
mod fetch;
9-
mod remote_progress;
1+
mod protocol;
2+
pub use protocol::*;

gix-protocol/tests/protocol/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pub type Result = std::result::Result<(), Box<dyn std::error::Error>>;
2+
3+
pub fn fixture_bytes(path: &str) -> Vec<u8> {
4+
std::fs::read(std::path::PathBuf::from("tests").join("fixtures").join(path))
5+
.expect("fixture to be present and readable")
6+
}
7+
8+
pub mod fetch;
9+
pub mod remote_progress;

0 commit comments

Comments
 (0)