Skip to content
Merged
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
12 changes: 11 additions & 1 deletion tests/chaos/network-delay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,17 @@ log_info "Step 4: Injecting ${DELAY_MS}ms network delay to $POSTGRES_CONTAINER..

if ! docker exec "$POSTGRES_CONTAINER" sh -c "command -v tc" 2>/dev/null; then
log_info "Installing iproute2..."
docker exec "$POSTGRES_CONTAINER" apk add -q iproute2 2>/dev/null || true
docker exec "$POSTGRES_CONTAINER" sh -c "
if command -v apk >/dev/null 2>&1; then
apk add -q iproute2 2>/dev/null || true
elif command -v apt-get >/dev/null 2>&1; then
apt-get update -qq && apt-get install -y -qq iproute2 2>/dev/null || true
elif command -v yum >/dev/null 2>&1; then
yum install -y -q iproute 2>/dev/null || true
elif command -v dnf >/dev/null 2>&1; then
dnf install -y -q iproute 2>/dev/null || true
fi
" || true
fi

INJECT_RESULT=$(docker exec "$POSTGRES_CONTAINER" sh -c "
Expand Down
Loading