v0.1.4-pre.015-fix.003
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-app-config-desk/unit_tests/logging_editor.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
#[test]
|
||||
fn committed_logging_document_maps_complete_read_only_editor_contract() {
|
||||
@@ -157,7 +157,8 @@ fn runtime_failure_rollback_restores_previous_logging_source() {
|
||||
if let std::result::Result::Err(error) = rolled_back {
|
||||
assert_eq!(error.code(), ksp_logging_lib::ERROR_CODE_RELOAD_FAILED);
|
||||
}
|
||||
assert_eq!(std::fs::read_to_string(root.join("config/std.logging.json")).ok(), std::option::Option::Some(previous));
|
||||
let restored = std::fs::read_to_string(root.join("config").join(ksp_config_lib::DEFAULT_STD_LOGGING_FILENAME)).ok();
|
||||
assert_eq!(restored, std::option::Option::Some(previous));
|
||||
}
|
||||
}
|
||||
let cleanup = std::fs::remove_dir_all(root.as_path());
|
||||
@@ -181,10 +182,10 @@ fn rollback_fixture() -> ksp_core_lib::Result<(std::path::PathBuf, ksp_config_li
|
||||
return std::result::Result::Err(ksp_core_lib::Error::new(crate::ERROR_CODE_APP_STATE_INVALID, "cannot create rollback fixture").with_source(error));
|
||||
}
|
||||
let workspace = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../..");
|
||||
let source_config = workspace.join("config/std.logging.json");
|
||||
let source_schema = workspace.join("config/schemas/std.logging.schema.json");
|
||||
let config_path = config_root.join("std.logging.json");
|
||||
let schema_path = schema_root.join("std.logging.schema.json");
|
||||
let source_config = workspace.join("config").join(ksp_config_lib::DEFAULT_STD_LOGGING_FILENAME);
|
||||
let source_schema = workspace.join("config/schemas").join(ksp_config_lib::DEFAULT_STD_LOGGING_SCHEMA_FILENAME);
|
||||
let config_path = config_root.join(ksp_config_lib::DEFAULT_STD_LOGGING_FILENAME);
|
||||
let schema_path = schema_root.join(ksp_config_lib::DEFAULT_STD_LOGGING_SCHEMA_FILENAME);
|
||||
let copied = std::fs::copy(source_config.as_path(), config_path.as_path());
|
||||
if let std::result::Result::Err(error) = copied {
|
||||
return std::result::Result::Err(
|
||||
|
||||
Reference in New Issue
Block a user