Skip to content

Commit

Permalink
Adds a test to check for crates in the Cargo.lock file that are being…
Browse files Browse the repository at this point in the history
… pulled in from a git source.
  • Loading branch information
arya2 committed Nov 4, 2024
1 parent 75fae66 commit 270e002
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions zebrad/tests/acceptance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3532,3 +3532,15 @@ async fn nu6_funding_streams_and_coinbase_balance() -> Result<()> {

Ok(())
}

/// Check that Zebra does not depend on any crates from git sources.
#[test]
#[ignore]
fn check_no_git_refs_in_cargo_lock() {
let cargo_lock_contents =
fs::read_to_string("../Cargo.lock").expect("should have Cargo.lock file in root dir");

if cargo_lock_contents.contains(r#"source = "git+"#) {
panic!("Cargo.lock includes git sources")
}
}

0 comments on commit 270e002

Please sign in to comment.