Implement retained virtual terminal presentation
This commit is contained in:
parent
aef24440a5
commit
f468592d95
1 changed files with 811 additions and 71 deletions
|
|
@ -344,13 +344,26 @@ fn test_user_namespace_map() -> UserNamespaceMap {
|
|||
fn assert_private_artifacts(bundle: &Path, control: &Path) {
|
||||
let config = bundle.join("config.json");
|
||||
let escalation_client = control.join("bin/lazaret-escalate");
|
||||
let terminfo = control.join("terminfo/t/tmux-256color");
|
||||
assert!(config.is_file());
|
||||
assert!(escalation_client.is_file());
|
||||
assert!(terminfo.is_file());
|
||||
assert!(control.join("credentials").is_dir());
|
||||
assert_eq!(mode(bundle), 0o700);
|
||||
assert_eq!(mode(control), 0o700);
|
||||
assert_eq!(mode(&config), 0o600);
|
||||
assert_eq!(mode(&escalation_client), 0o700);
|
||||
assert_eq!(mode(&terminfo), 0o400);
|
||||
let specification: serde_json::Value =
|
||||
serde_json::from_slice(&fs::read(config).unwrap()).unwrap();
|
||||
let mount = specification["mounts"]
|
||||
.as_array()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.find(|mount| mount["destination"] == "/run/lazaret/terminfo/t/tmux-256color")
|
||||
.unwrap();
|
||||
assert_eq!(mount["source"], terminfo.display().to_string());
|
||||
assert!(mount["options"].as_array().unwrap().contains(&"ro".into()));
|
||||
}
|
||||
|
||||
fn mode(path: &Path) -> u32 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue