Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/onboard/sandbox-gpu-preflight.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe("sandbox GPU preflight", () => {
expect(() =>
validateSandboxGpuPreflight(sandboxGpuConfig(), {
platform: "linux",
env: {},
dockerInfoFormat: dockerInfo,
getDockerCdiSpecDirs,
findReadableNvidiaCdiSpecFiles,
Expand Down
1 change: 1 addition & 0 deletions test/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5152,6 +5152,7 @@ describe("CLI dispatch", () => {
}),
{ mode: 0o600 },
);
writeHealthyDockerStub(localBin);
fs.writeFileSync(
path.join(localBin, "openshell"),
[
Expand Down
4 changes: 3 additions & 1 deletion test/install-docker-group-reexec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ function runEnsureDocker(env: Record<string, string>, installerArgs: string[]):
# - systemctl exits cleanly so the daemon-start branch is a no-op
# - user is non-root, not in docker group via NSS, not in active group list
# - sudo is a no-op so usermod doesn't actually run
# - is_wsl_host returns 1 so we don't bail out early
# - uname reports Linux and is_wsl_host returns 1 so platform guards
# don't bail out early when the test suite runs on macOS
uname() { printf 'Linux\n'; }
docker() { return 1; }
systemctl() { return 0; }
sudo() { return 0; }
Expand Down
6 changes: 4 additions & 2 deletions test/sandbox-provisioning.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,7 @@ describe("sandbox provisioning: base runtime tools", () => {
const log = path.join(tmp, "calls.log");
const marker = path.join(tmp, "ps-installed");
const chattrMarker = path.join(tmp, "chattr-installed");
const tmuxMarker = path.join(tmp, "tmux-installed");
const lists = path.join(tmp, "apt-lists");
fs.mkdirSync(lists);
const command = dockerRunCommandBetween(
Expand All @@ -695,9 +696,10 @@ describe("sandbox provisioning: base runtime tools", () => {
`call_log=${JSON.stringify(log)}`,
`ps_marker=${JSON.stringify(marker)}`,
`chattr_marker=${JSON.stringify(chattrMarker)}`,
`tmux_marker=${JSON.stringify(tmuxMarker)}`,
'apt-mark() { printf "apt-mark %s\\n" "$*" >> "$call_log"; }',
'apt-get() { printf "apt-get %s\\n" "$*" >> "$call_log"; if [[ "$*" == *"install"* && "$*" == *"procps=2:4.0.4-9"* ]]; then touch "$ps_marker"; fi; if [[ "$*" == *"install"* && "$*" == *"e2fsprogs=1.47.2-3+b11"* ]]; then touch "$chattr_marker"; fi; }',
'command() { if [ "${1:-}" = "-v" ] && [ "${2:-}" = "ps" ]; then [ -f "$ps_marker" ]; elif [ "${1:-}" = "-v" ] && [ "${2:-}" = "chattr" ]; then [ -f "$chattr_marker" ]; else builtin command "$@"; fi; }',
'apt-get() { printf "apt-get %s\\n" "$*" >> "$call_log"; if [[ "$*" == *"install"* && "$*" == *"procps=2:4.0.4-9"* ]]; then touch "$ps_marker"; fi; if [[ "$*" == *"install"* && "$*" == *"e2fsprogs=1.47.2-3+b11"* ]]; then touch "$chattr_marker"; fi; if [[ "$*" == *"install"* && "$*" == *"tmux=3.5a-3"* ]]; then touch "$tmux_marker"; fi; }',
'command() { if [ "${1:-}" = "-v" ] && [ "${2:-}" = "ps" ]; then [ -f "$ps_marker" ]; elif [ "${1:-}" = "-v" ] && [ "${2:-}" = "chattr" ]; then [ -f "$chattr_marker" ]; elif [ "${1:-}" = "-v" ] && [ "${2:-}" = "tmux" ]; then [ -f "$tmux_marker" ]; else builtin command "$@"; fi; }',
'ps() { [ -f "$ps_marker" ] || return 127; printf "procps test version\\n"; }',
command,
].join("\n");
Expand Down
Loading