You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
6.[Deployment Modes: Server vs Library](#deployment-modes-server-vs-library)
15
+
7.[Tags and Hooks](#tags-and-hooks)
16
+
8.[Configuration Files](#configuration-files)
17
+
9.[Feature Files and Steps](#feature-files-and-steps)
18
+
10.[Gherkin Keywords in Feature Files](#gherkin-keywords-in-feature-files)
19
+
11.[Writing New Scenarios](#writing-new-scenarios)
20
+
12.[Troubleshooting](#troubleshooting)
20
21
21
22
---
22
23
@@ -135,6 +136,35 @@ uv run behave tests/e2e/features/health.feature --tags=-skip-in-library-mode
135
136
136
137
---
137
138
139
+
## Running OKP RAG tests locally
140
+
141
+
`okp_rag.feature` is `@konflux-only` (`make test-e2e` skips it). Locally: OKP in Docker, OGX and LCS as host processes. Needs `registry.redhat.io` login, `OPENAI_API_KEY`, and `../lightspeed-providers`. Do not set `E2E_KONFLUX_E2E=1` (that deploys OKP on Kubernetes).
142
+
143
+
```bash
144
+
docker login registry.redhat.io
145
+
docker run --rm -d -p 8081:8080 registry.redhat.io/offline-knowledge-portal/rhokp-rhel9:latest
|`OPENAI_API_KEY`| — |**Required.** Used by the app and OGX for LLM calls (e.g. OpenAI). The E2E tests and the stack will not run correctly without it. |
154
186
155
187
@@ -175,6 +207,8 @@ All tag behaviour is implemented in **`features/environment.py`**: the hooks (`b
|`@skip`| Scenario is skipped (reason: "Marked with @skip"). Use for broken or WIP scenarios. |
210
+
|`@konflux-only`| Skipped unless `E2E_KONFLUX_E2E=1`. Used by `okp_rag.feature`. |
211
+
|`@cfg_okp`| OKP Solr RAG. Konflux deploys OKP in `before_feature`. See [Running OKP RAG tests locally](#running-okp-rag-tests-locally). |
178
212
|`@skip-in-library-mode`| Scenario is skipped when `E2E_DEPLOYMENT_MODE=library`. Used for tests that require a separate OGX (e.g. connection disruption). |
179
213
|`@local`| Skipped unless running in "local" mode (context flag). |
180
214
|`@InvalidFeedbackStorageConfig`| Before scenario: switch to invalid-feedback-storage config and restart container. After: restore feature config and restart. |
@@ -245,6 +279,7 @@ The feature files below are run in the order given in `tests/e2e/test_list.txt`:
If you add a new feature file, add it to **`tests/e2e/test_list.txt`** so it is included when you run the full E2E suite (e.g. `make test-e2e`). The order in that file is the run order.
@@ -354,6 +389,6 @@ Here, **Given** sets state, **When** performs the HTTP call, **Then** and **And*
354
389
-**Readonly database (SQLite) in OGX**: If the RAG KV DB is on a bind-mounted path that becomes read-only (e.g. after restart), move it to a named volume (e.g. via `KV_RAG_PATH` in docker-compose) so writes succeed.
355
390
-**ChunkedEncodingError on streaming_query**: The step for streaming_query uses `stream=True` and consumes the stream; if you add new streaming steps, avoid reading the full response with `response.content` and use the same stream-reading pattern so a server close after an error event does not raise.
356
391
-**Event loop is closed (httpx/AsyncClient)**: In E2E, any code that creates an `AsyncOgxClient` (e.g. for shields) must close it (e.g. `await client.close()`) in a `finally` block before the event loop is torn down (e.g. before `asyncio.run()` returns).
357
-
-**Scenarios skipped**: Check tags (`@skip`, `@skip-in-library-mode`, `@local`) and `E2E_DEPLOYMENT_MODE`; ensure the scenario is not excluded by `--tags=-skip` (or the opposite if you intend to run only skipped scenarios for debugging).
392
+
-**Scenarios skipped**: Check tags (`@skip`, `@skip-in-library-mode`, `@local`, `@konflux-only`) and `E2E_DEPLOYMENT_MODE`; ensure the scenario is not excluded by `--tags=-skip` (or the opposite if you intend to run only skipped scenarios for debugging).
358
393
359
394
For more on test structure and commands, see the main project guide (`CLAUDE.md`) and `tests/e2e/features/steps/README.md`.
Copy file name to clipboardExpand all lines: docs/user_doc/okp_guide.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,12 +54,14 @@ validating that queries return referenced chunks.
54
54
Start the OKP RAG service with Podman or Docker:
55
55
56
56
**Using Podman:**
57
+
57
58
```bash
58
59
podman login registry.redhat.io
59
60
podman run --rm -d -p 8081:8080 registry.redhat.io/offline-knowledge-portal/rhokp-rhel9:latest
60
61
```
61
62
62
63
**Using Docker:**
64
+
63
65
```bash
64
66
docker login registry.redhat.io
65
67
docker run --rm -d -p 8081:8080 registry.redhat.io/offline-knowledge-portal/rhokp-rhel9:latest
@@ -349,4 +351,6 @@ If you see no RAG context, verify:
349
351
1. OKP is up at http://localhost:8081
350
352
2. `lightspeed-stack.yaml` has `okp` under `rag.inline` and/or `rag.tool` as in Step 4
351
353
354
+
The Behave suite `okp_rag.feature` (`@cfg_okp`) runs in Konflux only. To stand up the same OKP + OGX + LCS topology on a laptop (OKP in Docker, OGX and LCS as host processes), see [Running OKP RAG tests locally](../testing/e2e_testing.md#running-okp-rag-tests-locally).
0 commit comments