Skip to content

OpenRAG is a comprehensive, single package Retrieval-Augmented Generation platform built on Langflow, Docling, and Opensearch.

Python

fix: changed integration tests to save logs instead of dumping them (#1991)

Lucas Oliveira724c85b56236
diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml
index f59f7a69d..9e0ee40f1 100644
--- a/.github/workflows/test-ci.yml
+++ b/.github/workflows/test-ci.yml
@@ -53,25 +53,13 @@ jobs:
with:
filters: |
e2e:
- - 'src/**'
- - 'frontend/**'
- - 'tests/**'
- - 'scripts/**'
- - 'flows/**'
- - 'docker-compose.yml'
- - 'Dockerfile*'
- - 'Makefile'
- - '.github/workflows/test-ci.yml'
+ - '**'
+ - '!docs/**'
+ - '!**/*.md'
integration:
- - 'src/**.py'
- - 'tests/**.py'
- - 'pyproject.toml'
- - 'uv.lock'
- - 'sdks/**'
- - 'flows/**'
- - 'Makefile'
- - 'scripts/**'
- - '.github/workflows/test-ci.yml'
+ - '**'
+ - '!docs/**'
+ - '!**/*.md'
build-images:
needs: changes
@@ -83,8 +71,6 @@ jobs:
- name: Cleanup Docker cache
run: |
- docker system prune -af || true
- docker builder prune -af || true
docker compose -f docker-compose.yml down -v --remove-orphans || true
- name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)
@@ -162,8 +148,6 @@ jobs:
- name: Cleanup Docker cache
run: |
- docker system prune -af || true
- docker builder prune -af || true
docker compose -f docker-compose.yml down -v --remove-orphans || true
- name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)
@@ -221,10 +205,19 @@ jobs:
# Disable startup ingest noise unless a test enables it
DISABLE_STARTUP_INGEST: "true"
run: |
+ chmod +x scripts/ci/run_integration_suite.sh
OPENRAG_VERSION="${CI_IMAGE_TAG}" TEST_SUITE="${{ matrix.suite }}" make test-ci-suite
echo "Keys directory after tests:"
ls -la keys/ || echo "No keys directory"
+ - name: Upload service logs
+ uses: actions/upload-artifact@v4
+ if: failure()
+ with:
+ name: service-logs-${{ matrix.suite }}
+ path: service-logs/
+ retention-days: 7
+
e2e-run:
needs: [changes, build-images]
if: ${{ needs.changes.outputs.e2e == 'true' || github.event_name == 'workflow_dispatch' }}
@@ -233,8 +226,6 @@ jobs:
steps:
- name: Cleanup Docker cache
run: |
- docker system prune -af || true
- docker builder prune -af || true
docker compose -f docker-compose.yml down -v --remove-orphans || true
- name: Cleanup root-owned files (OpenSearch data, config, Langflow data, keys, data, flows, documents)
@@ -268,7 +259,18 @@ jobs:
- name: Install Playwright Browsers
working-directory: frontend
run: |
- npx playwright install --with-deps chromium
+ for i in 1 2 3; do
+ echo "Installing Playwright browsers (attempt $i)..."
+ if npx playwright install --with-deps chromium; then
+ break
+ fi
+ echo "Attempt $i failed. Retrying in 10 seconds..."
+ sleep 10
+ if [ $i -eq 3 ]; then
+ echo "Failed to install Playwright browsers after 3 attempts."
+ exit 1
+ fi
+ done
- name: Download OpenRAG image artifact
uses: actions/download-artifact@v4
diff --git a/Makefile b/Makefile
index 7ebd6d17b..3d702e4c5 100644
--- a/Makefile
+++ b/Makefile
@@ -796,10 +796,15 @@ ci-build-images: ## Build all OpenRAG images for CI artifact sharing
@set -e; \
IMAGE_TAG=$${OPENRAG_VERSION:-latest}; \
echo "$(YELLOW)Building all OpenRAG images with tag '$$IMAGE_TAG'...$(NC)"; \
- $(CONTAINER_RUNTIME) build -t langflowai/openrag-opensearch:$$IMAGE_TAG -f Dockerfile .; \
- $(CONTAINER_RUNTIME) build -t langflowai/openrag-backend:$$IMAGE_TAG -f Dockerfile.backend .; \
- $(CONTAINER_RUNTIME) build -t langflowai/openrag-frontend:$$IMAGE_TAG -f Dockerfile.frontend .; \
- $(CONTAINER_RUNTIME) build -t langflowai/openrag-langflow:$$IMAGE_TAG -f Dockerfile.langflow .
+ $(CONTAINER_RUNTIME) build -t langflowai/openrag-opensearch:$$IMAGE_TAG -f Dockerfile . & PID1=$$!; \
+ $(CONTAINER_RUNTIME) build -t langflowai/openrag-backend:$$IMAGE_TAG -f Dockerfile.backend . & PID2=$$!; \
+ $(CONTAINER_RUNTIME) build -t langflowai/openrag-frontend:$$IMAGE_TAG -f Dockerfile.frontend . & PID3=$$!; \
+ $(CONTAINER_RUNTIME) build -t langflowai/openrag-langflow:$$IMAGE_TAG -f Dockerfile.langflow . & PID4=$$!; \
+ wait $$PID1 || exit 1; \
+ wait $$PID2 || exit 1; \
+ wait $$PID3 || exit 1; \
+ wait $$PID4 || exit 1; \
+ echo "$(GREEN)All images built successfully!$(NC)"
ci-save-images: ## Save CI-built OpenRAG images to .ci-artifacts/openrag-ci-images.tar
@set -e; \
@@ -818,8 +823,9 @@ test-ci-suite: ensure-langflow-data ensure-backend-volumes ## Run one CI integra
test-ci: ensure-langflow-data ensure-backend-volumes ## Start infra, run integration + SDK tests, tear down (uses DockerHub images)
@set -e; \
+ TEST_RESULT=0; \
echo "$(YELLOW)Installing test dependencies...$(NC)"; \
- uv sync --group dev; \
+ uv sync --quiet --group dev; \
echo "::group::Cleanup, Pull & Build Images"; \
echo "$(YELLOW)Cleaning up old containers and volumes...$(NC)"; \
$(COMPOSE_CMD) down -v 2>/dev/null || true; \
@@ -901,6 +907,7 @@ test-ci: ensure-langflow-data ensure-backend-volumes ## Start infra, run integra
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
echo "$(PURPLE) Core Integration Tests$(NC)"; \
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
+ mkdir -p service-logs; \
LOG_LEVEL=$${LOG_LEVEL:-DEBUG} \
GOOGLE_OAUTH_CLIENT_ID="" \
GOOGLE_OAUTH_CLIENT_SECRET="" \
@@ -908,8 +915,7 @@ test-ci: ensure-langflow-data ensure-backend-volumes ## Start infra, run integra
LANGFLOW_OPENSEARCH_HOST=opensearch LANGFLOW_OPENSEARCH_PORT=9200 \
OPENSEARCH_USERNAME=admin OPENSEARCH_PASSWORD=$${OPENSEARCH_PASSWORD} \
DISABLE_STARTUP_INGEST=$${DISABLE_STARTUP_INGEST:-true} \
- uv run pytest tests/integration/core -vv -s -o log_cli=true --log-cli-level=DEBUG; \
- TEST_RESULT=$$?; \
+ uv run pytest tests/integration/core -vv -s --log-file=service-logs/pytest-core.log --log-file-level=DEBUG --junitxml=service-logs/junit-core.xml || TEST_RESULT=1; \
echo "::endgroup::"; \
echo ""; \
echo "$(YELLOW)Waiting for frontend at http://localhost:3000...$(NC)"; \
@@ -920,8 +926,9 @@ test-ci: ensure-langflow-data ensure-backend-volumes ## Start infra, run integra
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
echo "$(PURPLE) SDK Integration Tests (Python)$(NC)"; \
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
- uv pip install -e sdks/python; \
- SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/sdk/ -vv -s || TEST_RESULT=1; \
+ uv pip install --quiet -e sdks/python; \
+ mkdir -p service-logs; \
+ SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/sdk/ -vv -s --log-file=service-logs/pytest-sdk.log --log-file-level=DEBUG --junitxml=service-logs/junit-sdk-python.xml || TEST_RESULT=1; \
echo "::endgroup::"; \
echo "::group::SDK Integration Tests (TypeScript)"; \
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
@@ -929,11 +936,14 @@ test-ci: ensure-langflow-data ensure-backend-volumes ## Start infra, run integra
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
cd sdks/typescript && \
npm install && npm run build && \
- OPENRAG_URL=http://localhost:3000 npm test || TEST_RESULT=1; \
+ OPENRAG_URL=http://localhost:3000 npm test -- --reporter=junit --outputFile=../../service-logs/junit-sdk-typescript.xml || TEST_RESULT=1; \
cd ../..; \
echo "::endgroup::"; \
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
echo ""; \
+ echo "::group::Test Failure Report"; \
+ uv run python scripts/ci/generate_test_report.py service-logs || true; \
+ echo "::endgroup::"; \
($(call test_jwt_opensearch)) || TEST_RESULT=1; \
echo "$(YELLOW)Tearing down infra$(NC)"; \
uv run python scripts/docling_ctl.py stop || true; \
@@ -942,8 +952,9 @@ test-ci: ensure-langflow-data ensure-backend-volumes ## Start infra, run integra
test-ci-local: ensure-langflow-data ensure-backend-volumes ## Same as test-ci but builds all images locally
@set -e; \
+ TEST_RESULT=0; \
echo "$(YELLOW)Installing test dependencies...$(NC)"; \
- uv sync --group dev; \
+ uv sync --quiet --group dev; \
echo "::group::Cleanup & Build Images"; \
echo "$(YELLOW)Cleaning up old containers and volumes...$(NC)"; \
$(COMPOSE_CMD) down -v 2>/dev/null || true; \
@@ -1026,6 +1037,7 @@ test-ci-local: ensure-langflow-data ensure-backend-volumes ## Same as test-ci bu
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
echo "$(PURPLE) Core Integration Tests$(NC)"; \
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
+ mkdir -p service-logs; \
LOG_LEVEL=$${LOG_LEVEL:-DEBUG} \
GOOGLE_OAUTH_CLIENT_ID="" \
GOOGLE_OAUTH_CLIENT_SECRET="" \
@@ -1033,8 +1045,7 @@ test-ci-local: ensure-langflow-data ensure-backend-volumes ## Same as test-ci bu
LANGFLOW_OPENSEARCH_HOST=opensearch LANGFLOW_OPENSEARCH_PORT=9200 \
OPENSEARCH_USERNAME=admin OPENSEARCH_PASSWORD=$${OPENSEARCH_PASSWORD} \
DISABLE_STARTUP_INGEST=$${DISABLE_STARTUP_INGEST:-true} \
- uv run pytest tests/integration/core -vv -s -o log_cli=true --log-cli-level=DEBUG; \
- TEST_RESULT=$$?; \
+ uv run pytest tests/integration/core -vv -s --log-file=service-logs/pytest-core.log --log-file-level=DEBUG --junitxml=service-logs/junit-core.xml || TEST_RESULT=1; \
echo "::endgroup::"; \
echo ""; \
echo "$(YELLOW)Waiting for frontend at http://localhost:3000...$(NC)"; \
@@ -1045,8 +1056,9 @@ test-ci-local: ensure-langflow-data ensure-backend-volumes ## Same as test-ci bu
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
echo "$(PURPLE) SDK Integration Tests (Python)$(NC)"; \
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
- uv pip install -e sdks/python; \
- SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/sdk/ -vv -s || TEST_RESULT=1; \
+ uv pip install --quiet -e sdks/python; \
+ mkdir -p service-logs; \
+ SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/sdk/ -vv -s --log-file=service-logs/pytest-sdk.log --log-file-level=DEBUG --junitxml=service-logs/junit-sdk-python.xml || TEST_RESULT=1; \
echo "::endgroup::"; \
echo "::group::SDK Integration Tests (TypeScript)"; \
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
@@ -1054,21 +1066,22 @@ test-ci-local: ensure-langflow-data ensure-backend-volumes ## Same as test-ci bu
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
cd sdks/typescript && \
npm install && npm run build && \
- OPENRAG_URL=http://localhost:3000 npm test || TEST_RESULT=1; \
+ OPENRAG_URL=http://localhost:3000 npm test -- --reporter=junit --outputFile=../../service-logs/junit-sdk-typescript.xml || TEST_RESULT=1; \
cd ../..; \
echo "::endgroup::"; \
echo "$(CYAN)════════════════════════════════════════$(NC)"; \
echo ""; \
if [ $$TEST_RESULT -ne 0 ]; then \
- echo "$(RED)=== Tests failed, dumping container logs ===$(NC)"; \
- echo ""; \
- echo "$(YELLOW)=== Langflow logs (last 500 lines) ===$(NC)"; \
- $(CONTAINER_RUNTIME) logs langflow 2>&1 | tail -500 || echo "$(RED)Could not get Langflow logs$(NC)"; \
- echo ""; \
- echo "$(YELLOW)=== Backend logs (last 200 lines) ===$(NC)"; \
- $(CONTAINER_RUNTIME) logs openrag-backend 2>&1 | tail -200 || echo "$(RED)Could not get backend logs$(NC)"; \
- echo ""; \
+ echo "$(RED)=== Tests failed, saving container logs to service-logs/ ===$(NC)"; \
+ mkdir -p service-logs; \
+ $(CONTAINER_RUNTIME) logs langflow > service-logs/langflow.log 2>&1 || echo "$(RED)Could not get Langflow logs$(NC)"; \
+ $(CONTAINER_RUNTIME) logs openrag-backend > service-logs/backend.log 2>&1 || echo "$(RED)Could not get backend logs$(NC)"; \
+ $(CONTAINER_RUNTIME) logs openrag-frontend > service-logs/frontend.log 2>&1 || echo "$(RED)Could not get frontend logs$(NC)"; \
+ $(CONTAINER_RUNTIME) logs os > service-logs/opensearch.log 2>&1 || echo "$(RED)Could not get OpenSearch logs$(NC)"; \
fi; \
+ echo "::group::Test Failure Report"; \
+ uv run python scripts/ci/generate_test_report.py service-logs || true; \
+ echo "::endgroup::"; \
($(call test_jwt_opensearch)) || TEST_RESULT=1; \
echo "$(YELLOW)Tearing down infra$(NC)"; \
uv run python scripts/docling_ctl.py stop || true; \
diff --git a/scripts/ci/generate_test_report.py b/scripts/ci/generate_test_report.py
new file mode 100644
index 000000000..85dc2c765
--- /dev/null
+++ b/scripts/ci/generate_test_report.py
@@ -0,0 +1,135 @@
+#!/usr/bin/env python3
+"""Generate a concise Test Failure Report from JUnit XML results.
+
+Scans a directory for `junit-*.xml` files (produced by `pytest --junitxml`
+or `vitest --reporter=junit`) and writes a short Markdown summary listing
+which tests failed and why, without dumping full service logs.
+"""
+import argparse
+import os
+import re
+import sys
+import xml.etree.ElementTree as ET
+from pathlib import Path
+
+REDACT_PATTERNS = [
+ (re.compile(r"Bearer [A-Za-z0-9._-]+"), "Bearer **REDACTED**"),
+ (re.compile(r"token=[A-Za-z0-9._-]+"), "token=**REDACTED**"),
+ (re.compile(r"sk-[A-Za-z0-9._-]+"), "sk-**REDACTED**"),
+]
+
+
+def redact(text: str) -> str:
+ password = os.environ.get("OPENSEARCH_PASSWORD")
+ if password:
+ text = text.replace(password, "**REDACTED**")
+ for pattern, replacement in REDACT_PATTERNS:
+ text = pattern.sub(replacement, text)
+ return text
+
+
+def first_line(text: str, max_len: int = 300) -> str:
+ text = text.strip()
+ if not text:
+ return ""
+ text = text.splitlines()[0]
+ return text[:max_len] + "..." if len(text) > max_len else text
+
+
+def parse_junit_file(path: Path):
+ tree = ET.parse(path)
+ root = tree.getroot()
+ suites = [root] if root.tag == "testsuite" else root.findall(".//testsuite")
+
+ totals = {"tests": 0, "failures": 0, "errors": 0, "skipped": 0}
+ cases = []
+ for suite in suites:
+ for key in totals:
+ totals[key] += int(suite.attrib.get(key, 0) or 0)
+ for case in suite.findall("testcase"):
+ failure = case.find("failure")
+ error = case.find("error")
+ problem = failure if failure is not None else error
+ if problem is None:
+ continue
+ message = problem.attrib.get("message") or problem.text or ""
+ cases.append(
+ {
+ "classname": case.attrib.get("classname", ""),
+ "name": case.attrib.get("name", ""),
+ "message": redact(first_line(message)),
+ }
+ )
+ return totals, cases
+
+
+def build_report(directory: Path) -> str:
+ junit_files = sorted(directory.glob("junit-*.xml"))
+ lines = ["# Test Failure Report", ""]
+
+ if not junit_files:
+ lines.append("No JUnit result files found in `%s`." % directory)
+ return "\n".join(lines) + "\n"
+
+ any_failures = False
+ for junit_file in junit_files:
+ suite_name = junit_file.stem[len("junit-"):]
+ lines.append(f"## {suite_name}")
+ try:
+ totals, cases = parse_junit_file(junit_file)
+ except ET.ParseError as exc:
+ lines.append(f"Could not parse `{junit_file.name}`: {exc}")
+ lines.append("")
+ continue
+
+ lines.append(
+ f"- Total: {totals['tests']}, "
+ f"Failed: {totals['failures']}, "
+ f"Errors: {totals['errors']}, "
+ f"Skipped: {totals['skipped']}"
+ )
+ if cases:
+ any_failures = True
+ lines.append("")
+ lines.append("| Test | Message |")
+ lines.append("| --- | --- |")
+ for case in cases:
+ full_name = f"{case['classname']}::{case['name']}".strip(":")
+ message = case["message"].replace("|", "\\|") or "(no message captured)"
+ lines.append(f"| `{full_name}` | {message} |")
+ lines.append("")
+
+ if not any_failures:
+ lines.append("All tests passed.")
+
+ return "\n".join(lines) + "\n"
+
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument(
+ "directory",
+ nargs="?",
+ default="service-logs",
+ help="Directory containing junit-*.xml files (default: service-logs)",
+ )
+ parser.add_argument(
+ "-o",
+ "--output",
+ default=None,
+ help="Output path for the report (default: <directory>/test-failure-report.md)",
+ )
+ args = parser.parse_args()
+
+ directory = Path(args.directory)
+ output_path = Path(args.output) if args.output else directory / "test-failure-report.md"
+
+ report = build_report(directory)
+
+ output_path.parent.mkdir(parents=True, exist_ok=True)
+ output_path.write_text(report)
+ print(report)
+
+
+if __name__ == "__main__":
+ sys.exit(main())
\ No newline at end of file
diff --git a/scripts/ci/run_integration_suite.sh b/scripts/ci/run_integration_suite.sh
index 2174f356c..8b4483bf6 100755
--- a/scripts/ci/run_integration_suite.sh
+++ b/scripts/ci/run_integration_suite.sh
@@ -68,20 +68,29 @@ test_jwt_opensearch() {
}
dump_logs() {
- echo "${red}=== Tests failed, dumping container logs ===${nc}"
- echo ""
- echo "${yellow}=== Langflow logs (last 500 lines) ===${nc}"
- "$container_runtime" logs langflow 2>&1 | tail -500 || echo "${red}Could not get Langflow logs${nc}"
- echo ""
- echo "${yellow}=== Backend logs (last 500 lines) ===${nc}"
- "$container_runtime" logs openrag-backend 2>&1 | tail -500 || echo "${red}Could not get backend logs${nc}"
- echo ""
- echo "${yellow}=== Frontend logs (last 300 lines) ===${nc}"
- "$container_runtime" logs openrag-frontend 2>&1 | tail -300 || echo "${red}Could not get frontend logs${nc}"
- echo ""
- echo "${yellow}=== OpenSearch logs (last 300 lines) ===${nc}"
- "$container_runtime" logs os 2>&1 | tail -300 || echo "${red}Could not get OpenSearch logs${nc}"
- echo ""
+ echo "${red}=== Tests failed, saving container logs to service-logs/ ===${nc}"
+ mkdir -p service-logs
+
+ redact() {
+ local pw="${OPENSEARCH_PASSWORD:-__unset__}"
+ pw=$(printf '%s\n' "$pw" | sed -E 's/([][\\/.*+?^$|()])/\\\1/g')
+ sed -E -e 's/Bearer [A-Za-z0-9._-]+/Bearer **REDACTED**/g' \
+ -e 's/token=[A-Za-z0-9._-]+/token=**REDACTED**/g' \
+ -e 's/sk-[A-Za-z0-9._-]+/sk-**REDACTED**/g' \
+ -e "s/${pw}/**REDACTED**/g"
+ }
+
+ "$container_runtime" logs --tail 10000 langflow 2>&1 | redact > service-logs/langflow.log || echo "${red}Could not get Langflow logs${nc}"
+ "$container_runtime" logs --tail 10000 openrag-backend 2>&1 | redact > service-logs/backend.log || echo "${red}Could not get backend logs${nc}"
+ "$container_runtime" logs --tail 10000 openrag-frontend 2>&1 | redact > service-logs/frontend.log || echo "${red}Could not get frontend logs${nc}"
+ "$container_runtime" logs --tail 10000 os 2>&1 | redact > service-logs/opensearch.log || echo "${red}Could not get OpenSearch logs${nc}"
+}
+
+generate_report() {
+ uv run python scripts/ci/generate_test_report.py service-logs || true
+ if [[ -n "${GITHUB_STEP_SUMMARY:-}" && -f service-logs/test-failure-report.md ]]; then
+ cat service-logs/test-failure-report.md >> "$GITHUB_STEP_SUMMARY"
+ fi
}
teardown() {
@@ -90,6 +99,8 @@ teardown() {
test_result="$status"
fi
+ generate_report || true
+
if [[ "$test_result" -ne 0 ]]; then
dump_logs || true
fi
@@ -108,7 +119,7 @@ if [[ -z "${OPENSEARCH_PASSWORD:-}" ]]; then
fi
echo "${yellow}Installing test dependencies...${nc}"
-uv sync --group dev
+uv sync --quiet --group dev
echo "::group::Start Infrastructure"
echo "${yellow}Cleaning up old containers and volumes...${nc}"
@@ -186,12 +197,15 @@ wait_for_url "Langflow" "http://localhost:7860/" 60
wait_for_url "docling-serve at ${docling_endpoint}" "${docling_endpoint}/health" 60
echo "::endgroup::"
+mkdir -p service-logs
+
case "$suite" in
core)
echo "::group::Core Integration Tests"
echo "${cyan}════════════════════════════════════════${nc}"
echo "${purple} Core Integration Tests${nc}"
echo "${cyan}════════════════════════════════════════${nc}"
+ mkdir -p service-logs
LOG_LEVEL="${LOG_LEVEL:-DEBUG}" \
GOOGLE_OAUTH_CLIENT_ID="" \
GOOGLE_OAUTH_CLIENT_SECRET="" \
@@ -199,7 +213,7 @@ case "$suite" in
LANGFLOW_OPENSEARCH_HOST=opensearch LANGFLOW_OPENSEARCH_PORT=9200 \
OPENSEARCH_USERNAME=admin OPENSEARCH_PASSWORD="${OPENSEARCH_PASSWORD}" \
DISABLE_STARTUP_INGEST="${DISABLE_STARTUP_INGEST:-true}" \
- uv run pytest tests/integration/core -vv -s -o log_cli=true --log-cli-level=DEBUG || test_result=1
+ uv run pytest tests/integration/core -vv -s --log-file=service-logs/pytest-core.log --log-file-level=DEBUG --junitxml=service-logs/junit-core.xml || test_result=1
echo "::endgroup::"
test_jwt_opensearch || test_result=1
;;
@@ -209,8 +223,8 @@ case "$suite" in
echo "${cyan}════════════════════════════════════════${nc}"
echo "${purple} SDK Integration Tests (Python)${nc}"
echo "${cyan}════════════════════════════════════════${nc}"
- uv pip install -e sdks/python
- SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/sdk/ -vv -s || test_result=1
+ uv pip install --quiet -e sdks/python
+ SDK_TESTS_ONLY=true OPENRAG_URL=http://localhost:3000 uv run pytest tests/integration/sdk/ -vv -s --log-file=service-logs/pytest-sdk.log --log-file-level=DEBUG --junitxml=service-logs/junit-sdk-python.xml || test_result=1
echo "::endgroup::"
;;
sdk-typescript)
@@ -220,7 +234,7 @@ case "$suite" in
echo "${purple} SDK Integration Tests (TypeScript)${nc}"
echo "${cyan}════════════════════════════════════════${nc}"
cd sdks/typescript
- npm install && npm run build && OPENRAG_URL=http://localhost:3000 npm test || test_result=1
+ npm install && npm run build && OPENRAG_URL=http://localhost:3000 npm test -- --reporter=junit --outputFile=../../service-logs/junit-sdk-typescript.xml || test_result=1
cd ../..
echo "::endgroup::"
;;