v0.1.4-pre.015-fix.002
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-config-lib/unit_tests/environment.rs
|
||||
// version: 4
|
||||
// version: 5
|
||||
|
||||
#[test]
|
||||
fn process_environment_wins_over_dotenv_and_fallback_even_when_empty() {
|
||||
@@ -174,9 +174,8 @@ fn fake_process_collection_filters_unrelated_names_without_mutating_real_environ
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn committed_logging_profile_resolves_environment_fallback_without_changing_source_profile() {
|
||||
let workspace = workspace_root();
|
||||
let bootstrap = crate::ConfigBootstrapOptions::from_paths(workspace.join("config"), workspace.join("config/schemas"));
|
||||
fn logging_fixture_profile_resolves_environment_fallback_without_changing_source_profile() {
|
||||
let bootstrap = logging_fixture_bootstrap();
|
||||
assert!(bootstrap.is_ok(), "bootstrap should resolve committed roots");
|
||||
let bootstrap = match bootstrap {
|
||||
std::result::Result::Ok(value) => value,
|
||||
@@ -235,6 +234,12 @@ fn workspace_root() -> std::path::PathBuf {
|
||||
return std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../..");
|
||||
}
|
||||
|
||||
fn logging_fixture_bootstrap() -> ksp_core_lib::Result<crate::ConfigBootstrapOptions> {
|
||||
let fixture_root = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("unit_tests/fixtures");
|
||||
let workspace = workspace_root();
|
||||
return crate::ConfigBootstrapOptions::from_paths(fixture_root, workspace.join("config/schemas"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn secret_environment_value_keeps_real_value_but_redacts_safe_and_debug_views() {
|
||||
let canary = "KSP_SECRET_CANARY_91b7c6";
|
||||
@@ -322,9 +327,8 @@ fn detailed_json_preserves_safe_tree_sensitivity_and_pointer_provenance() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn detailed_profile_environment_keeps_global_origin_and_adds_environment_provenance() {
|
||||
let workspace = workspace_root();
|
||||
let bootstrap = crate::ConfigBootstrapOptions::from_paths(workspace.join("config"), workspace.join("config/schemas"));
|
||||
fn detailed_fixture_profile_environment_keeps_global_origin_and_adds_environment_provenance() {
|
||||
let bootstrap = logging_fixture_bootstrap();
|
||||
let bootstrap = match bootstrap {
|
||||
std::result::Result::Ok(value) => value,
|
||||
std::result::Result::Err(_) => return,
|
||||
|
||||
Reference in New Issue
Block a user