From 0caf1e6345a30a7a2e3bb5df049f0bec3685157a Mon Sep 17 00:00:00 2001 From: Soc Virnyl Estela Date: Wed, 6 Nov 2024 06:41:58 +0800 Subject: [PATCH] tests: adjust if-else as without it will lead to failure since we are testing that raw cannot find a vendor tarball Signed-off-by: Soc Virnyl Estela --- cargo/tests/behaviour.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cargo/tests/behaviour.rs b/cargo/tests/behaviour.rs index 9dc35b7..6a69177 100644 --- a/cargo/tests/behaviour.rs +++ b/cargo/tests/behaviour.rs @@ -64,7 +64,11 @@ async fn vendor_source(source: &str, filter: bool) -> io::Result { target: vendor_tarball_path.to_path_buf(), outdir: Some(raw_outdir.clone()), }; - raw_opts(raw_args, false)?; + if *"https://github.com/elliot40404/bonk/archive/refs/tags/v0.3.2.tar.gz" != *source { + assert!(raw_opts(raw_args, false).is_ok()); + } else { + assert!(raw_opts(raw_args, false).is_err()); + } let vendor_path = raw_outdir.join("vendor"); let cargo_config_path = raw_outdir.join(".cargo").join("config.toml"); let cargo_lock_path = raw_outdir.join("Cargo.lock");