v0.1.4-pre.016

This commit is contained in:
2026-08-16 19:00:49 +02:00
parent d92eb01bc2
commit 5aa538ed5d
29 changed files with 994 additions and 73 deletions

View File

@@ -0,0 +1,26 @@
// file: crates/ksp-app-config-desk/unit_tests/logging_runtime.rs
// version: 1
#[test]
fn launch_identity_is_safe_and_contains_application_and_process_identity() {
let identity = super::launch_identity();
assert!(identity.is_ok());
if let std::result::Result::Ok(identity) = identity {
assert_eq!(identity.application_id(), crate::TRACING_TARGET);
assert!(identity.launch_timestamp().contains("Z-p"));
assert!(identity.launch_timestamp().ends_with(std::process::id().to_string().as_str()));
}
}
#[test]
fn runtime_rotation_labels_are_stable() {
assert_eq!(super::rotation_label(ksp_logging_lib::FileRotation::Never), "never");
assert_eq!(super::rotation_label(ksp_logging_lib::FileRotation::Hourly), "hourly");
assert_eq!(super::rotation_label(ksp_logging_lib::FileRotation::Daily), "daily");
}
#[test]
fn runtime_count_projection_is_non_lossy_for_normal_values() {
assert_eq!(super::count_to_u64(0), 0);
assert_eq!(super::count_to_u64(42), 42);
}