MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / a_new_log_dir_is_private

Function a_new_log_dir_is_private

atomic-cli/src/logging/mod.rs:465–474  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

463 #[cfg(unix)]
464 #[test]
465 fn a_new_log_dir_is_private() {
466 use std::os::unix::fs::PermissionsExt;
467 let home = tempfile::tempdir().unwrap();
468 let dir = home.path().join("new").join("logs");
469 open_file(&dir).unwrap();
470 for created in [home.path().join("new"), dir] {
471 let mode = std::fs::metadata(&created).unwrap().permissions().mode();
472 assert_eq!(mode & 0o777, 0o700, "{}", created.display());
473 }
474 }
475
476 #[test]
477 fn command_path_names_every_subcommand_level() {

Callers

nothing calls this directly

Calls 5

open_fileFunction · 0.85
unwrapMethod · 0.45
pathMethod · 0.45
modeMethod · 0.45
permissionsMethod · 0.45

Tested by

no test coverage detected