test: fake id command so native port takeover e2e test runs without real root

This commit is contained in:
Marek Miklewicz
2026-07-05 21:51:34 +02:00
parent c59d5b8c77
commit 5b68a6aac8
@@ -71,6 +71,16 @@ write_common_stubs() {
local dir="$1" local dir="$1"
local mode="${2:-happy}" local mode="${2:-happy}"
cat > "$dir/bin/id" <<'EOF'
#!/bin/bash
if [ "$1" = "-u" ]; then
echo 0
exit 0
fi
exit 1
EOF
chmod 755 "$dir/bin/id"
cat > "$dir/bin/da" <<EOF cat > "$dir/bin/da" <<EOF
#!/bin/bash #!/bin/bash
echo "\$*" >> "$dir/da_calls.log" echo "\$*" >> "$dir/da_calls.log"