Integrate routed Git workspaces with persistent state
This commit is contained in:
parent
943c56eea8
commit
917409fcc6
1 changed files with 2363 additions and 119 deletions
|
|
@ -13,7 +13,7 @@ use lazaret_runtime_supervisor::sandbox::{
|
|||
MAILBOX_REQUESTS_DESTINATION, MAILBOX_RESULTS_DESTINATION, NETWORK_NAMESPACE_PATH, RootProcess,
|
||||
SANDBOX_INIT_DESTINATION, SandboxBuildErrorKind, SandboxBuildRequest, SandboxBundle,
|
||||
TERMINFO_ROOT_DESTINATION, WORKSPACE_DESTINATION, build_sandbox_bundle,
|
||||
production_sandbox_layout, stage_host_terminal,
|
||||
build_sandbox_bundle_with_workspace, production_sandbox_layout, stage_host_terminal,
|
||||
};
|
||||
use serde_json::Value;
|
||||
use tempfile::TempDir;
|
||||
|
|
@ -324,6 +324,20 @@ fn deterministic_snapshot_has_only_private_namespaces_and_fixed_runtime_shape()
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn routed_workspace_source_replaces_only_the_workspace_bind_source() {
|
||||
let fixture = Fixture::new();
|
||||
let routed = fixture.tree.path().join("runtime/routed-workspace");
|
||||
let bundle =
|
||||
build_sandbox_bundle_with_workspace(fixture.request(root_process([])), routed.clone())
|
||||
.unwrap();
|
||||
let specification = value(&bundle);
|
||||
assert_eq!(
|
||||
mounts(&specification)[WORKSPACE_DESTINATION]["source"],
|
||||
routed.to_string_lossy().as_ref()
|
||||
);
|
||||
}
|
||||
|
||||
fn assert_runtime_command(bundle: &SandboxBundle, fixture: &Fixture) {
|
||||
assert_eq!(bundle.command().program(), OsStr::new("runsc"));
|
||||
let runtime_domain = String::from_utf8(
|
||||
|
|
|
|||
Loading…
Reference in a new issue