File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed
Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change @@ -224,9 +224,18 @@ oc expose pod lightspeed-stack-service \
224224 --type=ClusterIP \
225225 -n $NAMESPACE
226226
227- # Kill any existing processes on ports 8080 and 8000
228- lsof -ti:8080 | xargs kill -9 2> /dev/null || true
229- lsof -ti:8000 | xargs kill -9 2> /dev/null || true
227+ # Kill any existing processes on ports 8080 and 8000 (lsof often missing in minimal images)
228+ kill_listeners_on_ports () {
229+ local p
230+ for p in " $@ " ; do
231+ if command -v lsof > /dev/null 2>&1 ; then
232+ lsof -ti:" $p " | xargs kill -9 2> /dev/null || true
233+ elif command -v fuser > /dev/null 2>&1 ; then
234+ fuser -k " ${p} /tcp" 2> /dev/null || true
235+ fi
236+ done
237+ }
238+ kill_listeners_on_ports 8080 8000
230239
231240# Start port-forward for lightspeed-stack
232241progress " Starting port-forward, then E2E tests"
Original file line number Diff line number Diff line change @@ -35,10 +35,22 @@ for i in $(seq 1 12); do
3535done
3636ts " End: wait for service"
3737
38- ts " Start: pip install uv "
38+ ts " Start: ensure uv is available "
3939echo " Installing test dependencies..."
40- pip install uv
41- ts " End: pip install uv"
40+ if command -v uv > /dev/null 2>&1 ; then
41+ echo " uv already on PATH"
42+ elif command -v pip > /dev/null 2>&1 ; then
43+ pip install uv
44+ elif command -v python3 > /dev/null 2>&1 && python3 -m pip --version > /dev/null 2>&1 ; then
45+ python3 -m pip install --user uv
46+ export PATH=" ${HOME} /.local/bin:${PATH} "
47+ else
48+ echo " Installing uv via astral.sh (no pip in image)..."
49+ curl -LsSf https://astral.sh/uv/install.sh | sh
50+ export PATH=" ${HOME} /.local/bin:${PATH} "
51+ fi
52+ command -v uv > /dev/null 2>&1 || { echo " ❌ uv not available after install" ; exit 1; }
53+ ts " End: ensure uv is available"
4254
4355ts " Start: uv sync"
4456uv sync
You can’t perform that action at this time.
0 commit comments