cuddle-please/crates/cuddle-please/tests/vcs.rs
kjuulh 6f694fa0b0
All checks were successful
continuous-integration/drone/push Build is passing
chore: remove faulty test
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-08-04 00:43:56 +02:00

39 lines
877 B
Rust

pub mod common;
use cuddle_please_misc::VcsClient;
use tracing_test::traced_test;
use crate::common::get_test_data_path;
#[test]
#[traced_test]
fn test_vcs_get_noop() {
let noop = VcsClient::new_noop();
assert!(matches!(noop, VcsClient::Noop {}));
}
#[test]
#[traced_test]
fn test_vcs_get_git_found() {
let testdata = get_test_data_path("git-found");
if let Err(e) = std::process::Command::new("git")
.arg("init")
.arg(".")
.current_dir(&testdata)
.output()
{
println!("{e}");
}
return;
let git = VcsClient::new_git(&testdata, None::<String>, None::<String>, "".into()).unwrap();
assert_eq!(
git,
VcsClient::Git {
source: testdata,
username: "cuddle-please".into(),
email: "bot@cuddle.sh".into(),
token: "".into(),
}
)
}