Files
openobserve/tests/api-testing
Neha PandClaude 87a507f83a test: add API tests for bulk enable, functions, kvstore, multi-stream search, passcode (#10155)
### **User description**
- Add test_alert_bulk_enable.py: bulk enable/disable alerts (5 tests)
- Add test_function_test_endpoint.py: VRL function testing (7 tests)
- Add test_kvstore.py: KV store CRUD operations (8 tests)
- Add test_multi_stream_search.py: multi-stream SSE search (6 tests)
- Add test_org_passcode.py: organization passcode API (4 tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)


___

### **PR Type**
Tests


___

### **Description**
- Bulk alert enable/disable tests for existing alerts

- VRL/JS function test endpoint happy and error flows

- KV store create, read, list, update, delete tests

- Multi-stream SSE search tests for various scenarios

- Organization passcode get, update, persistence tests


___



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>test_alert_bulk_enable.py</strong><dd><code>Bulk alert
enable/disable tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

tests/api-testing/tests/test_alert_bulk_enable.py

<ul><li>Fixture setup for session and existing alerts retrieval<br> <li>
Tests bulk disable and enable single alerts<br> <li> Tests bulk disable
for multiple alerts<br> <li> Idempotency and response structure
verification</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10155/files#diff-bb438bbffe5aad82142e50aa7765cb47c711463ffc0fc1ce72b221cbcadafe9a">+241/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>test_function_test_endpoint.py</strong><dd><code>Function
test endpoint tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/api-testing/tests/test_function_test_endpoint.py

<ul><li>Fixture setup for VRL/JS function test endpoint<br> <li> Tests
basic function and value modification<br> <li> Multi-event and
conditional logic tests<br> <li> Invalid syntax and response structure
verification</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10155/files#diff-8f8ba09e2a96c246c77ae4512443842d0e8accb855bac0f949971941b9956b6c">+230/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>test_kvstore.py</strong><dd><code>KV store CRUD API
tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/api-testing/tests/test_kvstore.py

<ul><li>Added KV store CRUD tests (create, read, list)<br> <li> Tests
prefix filtering and update behavior<br> <li> Delete operations, 404 and
idempotency tests</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10155/files#diff-b353df992b5db6b02190e9232e077967b8c30d702f24bb1903c8d5c8c32fd14e">+226/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>test_multi_stream_search.py</strong><dd><code>Multi-stream
search SSE tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

tests/api-testing/tests/test_multi_stream_search.py

<ul><li>Fixture setup and SSE response parser added<br> <li> Tests
single and multi-stream search queries<br> <li> SSE format and metadata
structure verification<br> <li> Size limit and invalid stream handling
tests</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10155/files#diff-c20d33fef67f42eb651e7a0d5d97d053c1d0d58307c13fb57ea0a19ffeedb329">+223/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>test_org_passcode.py</strong><dd><code>Organization
passcode API tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

tests/api-testing/tests/test_org_passcode.py

<ul><li>Tests organization passcode get and update endpoints<br> <li>
Verifies persistence and response structure</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10155/files#diff-819841cc5f7f2475248a5edd31f9d44c79159fa6fb97a9c2db9ea70139904379">+126/-0</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-23 11:07:04 +05:30
..
2026-01-14 16:54:35 +08:00
2025-07-31 14:31:33 +08:00
2026-01-14 16:54:35 +08:00
2026-01-14 16:54:35 +08:00

pytest-openobserve

This is a repo to test openobserve API endpoints.

Introduction:

The tests are running using pytest against alpha1 for now. Idea is to parametrize it for the other endpoints like production as well.

Getting Started

  • We use rye to manage the python version and environment - https://github.com/mitsuhiko/rye
  • Once installed, simply run the following steps:
    • rye sync
    • rye run pytest

TODOS:

  • Parametrize tests to run against different environments
  • Run the tests as cron-job every few hours or daily etc. for different environments
  • Send slack-notification ( use github-actions ) in case something fails on alpha1 or production endpoints.