v0.1.4-pre.006

This commit is contained in:
2026-08-16 11:38:07 +02:00
parent abe3f8daa6
commit 34f6f448fb
18 changed files with 669 additions and 50 deletions

View File

@@ -0,0 +1,17 @@
// file: crates/ksp-app-config-desk/unit_tests/bootstrap.rs
// version: 1
#[test]
fn fallback_logging_is_console_only_and_bounded_to_info() {
let settings = super::fallback_logging_settings();
assert_eq!(settings.default_filter(), ksp_logging_lib::LogFilterLevel::Info);
assert_eq!(settings.span_events(), ksp_logging_lib::SpanEvents::Off);
assert!(settings.files().is_empty());
let console = settings.console();
assert!(console.is_some());
if let std::option::Option::Some(console) = console {
assert!(console.enabled());
assert_eq!(console.output(), ksp_logging_lib::ConsoleOutput::Stderr);
assert_eq!(console.format(), ksp_logging_lib::LogFormat::Human);
}
}

View File

@@ -0,0 +1,11 @@
// file: crates/ksp-app-config-desk/unit_tests/dto_common.rs
// version: 1
#[test]
fn command_error_projection_excludes_context_values() {
let error = ksp_core_lib::Error::new(ksp_core_lib::ErrorCode::new("test", "failure"), "safe message").with_context("secret_canary", "must-not-be-exported");
let dto = super::CommandErrorDto::from_error(&error);
assert_eq!(dto.domain, "test");
assert_eq!(dto.code, "failure");
assert_eq!(dto.message, "safe message");
}