Skip to content
Draft
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
12 changes: 10 additions & 2 deletions images/tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,20 @@ RUN poetry install --no-root --with test && rm -rf $POETRY_CACHE_DIR
# Runtime stage
FROM python:3.12-slim

# Install system dependencies for runtime
# Install system dependencies for runtime including Chrome for Selenium tests
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
wget \
gnupg \
&& wget -q -O /tmp/google-chrome-key.pub https://dl-ssl.google.com/linux/linux_signing_key.pub \
&& gpg --dearmor -o /usr/share/keyrings/google-chrome-keyring.gpg /tmp/google-chrome-key.pub \
&& echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome-keyring.gpg] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
google-chrome-stable \
&& rm -rf /var/lib/apt/lists/* /tmp/google-chrome-key.pub

# Install OpenShift CLI (oc)
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/clients/oc/latest/linux/oc.tar.gz | \
Expand Down
14 changes: 14 additions & 0 deletions images/tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,20 @@ cp "${TEMP_KUBECONFIG}" ~/.kube/config || {

echo "Successfully logged in with TEST_USER"

# ============================================================================
# Get RHOAI Dashboard URL for UI Tests
# ============================================================================
echo "Retrieving RHOAI Dashboard URL..."
ODH_DASHBOARD_URL=$(oc get consolelink rhodslink -o jsonpath='{.spec.href}' 2>/dev/null)

if [ -z "$ODH_DASHBOARD_URL" ]; then
echo "WARNING: Failed to retrieve Dashboard URL from consolelink rhodslink"
echo " UI tests will be skipped or may fail"
else
echo "Dashboard URL: $ODH_DASHBOARD_URL"
export ODH_DASHBOARD_URL
fi

# ============================================================================
# Run Tests
# ============================================================================
Expand Down
151 changes: 149 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ coverage = "7.6.4"
pytest-mock = "3.11.1"
pytest-timeout = "2.3.1"
jupyterlab = "4.3.1"
selenium = "4.27.1"
webdriver-manager = "4.0.2"


[tool.poetry.group.dev.dependencies]
Expand All @@ -83,7 +85,8 @@ markers = [
"smoke: Smoke tests - quick validation tests",
"tier1: Tier1 tests - standard test suite",
"pre_upgrade: Tests to run before upgrade",
"post_upgrade: Tests to run after upgrade"
"post_upgrade: Tests to run after upgrade",
"ui: UI tests requiring browser automation"
]
addopts = "--timeout=900 --ignore=src/codeflare_sdk/vendored"
testpaths = ["src/codeflare_sdk"]
Expand Down
Loading
Loading