Add session resuming

This commit is contained in:
Samuel Aubertin
2025-11-14 11:21:14 +01:00
parent 67fd0cd9c9
commit 698ca67677
5 changed files with 71 additions and 6 deletions

View File

@@ -289,6 +289,23 @@ run_secret_mask() {
teardown_stub_env
}
run_resume_target() {
local scenario_dir="$TEST_ROOT/resume_target"
printf '==> resume_target\n'
setup_stub_env
local session_id="019a81b7-32d2-7622-8639-6698c6579625"
if ! PATH="$STUB_BIN:$PATH" HOME="$STUB_HOME" FAKE_PODMAN_LOG="$STUB_LOG" \
"$SLOPTRAP_BIN" "$scenario_dir" resume "$session_id" >/dev/null 2>&1; then
record_failure "resume_target: sloptrap exited non-zero"
teardown_stub_env
return
fi
if ! grep -q -- "resume $session_id" "$STUB_LOG"; then
record_failure "resume_target: resume invocation missing"
fi
teardown_stub_env
}
run_shellcheck
run_mount_injection
run_root_target
@@ -296,6 +313,7 @@ run_symlink_escape
run_manifest_injection
run_helper_symlink
run_secret_mask
run_resume_target
if [[ ${#failures[@]} -gt 0 ]]; then
printf '\nTest failures:\n'