kjuulh 5fd902f87c
All checks were successful
continuous-integration/drone/push Build is passing
feat: enable commit bodies in changelog and fixes general warnings and updates (#49)
Allows commit bodies to show up in release notes, this is something I'd prefer as my releases are usually short, and I'd like to see these as I don't use pull requests as often, and often miss the context, as I don't link to commits currently.

Also fixes a lot of warnings and reintroduces failing tests, still not perfect, but better than before.
Co-authored-by: kjuulh <contact@kjuulh.io>
Co-committed-by: kjuulh <contact@kjuulh.io>
2025-01-09 23:46:07 +01:00

42 lines
1013 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::fs::create_dir_all(&testdata) {
tracing::error!("failed to create dir: {}", e);
}
if let Err(e) = std::process::Command::new("git")
.arg("init")
.arg(".")
.current_dir(&testdata)
.output()
{
println!("testdata git dir not found: {e}");
}
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(),
}
)
}