mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
### **PR Type**
Tests
___
### **Description**
Re-enable streaming SQL E2E tests
Add values streaming endpoint tests
Cover cache and non-cache paths
Validate response schema and totals
___
### Diagram Walkthrough
```mermaid
flowchart LR
SQLTests["SQL streaming tests"] -- "parametrized inputs" --> StreamNoCache["POST _search_stream use_cache=false"]
SQLTests -- "cache verification" --> StreamCache["POST _search_stream use_cache=true"]
ValuesTests["Values streaming tests"] -- "no cache" --> ValuesNoCache["POST _values_stream use_cache=false"]
ValuesTests -- "with cache" --> ValuesCache["POST _values_stream use_cache=true"]
StreamNoCache --> AssertSQL["Assert 200, totals match"]
StreamCache --> AssertSQLCache["Assert 200, totals match"]
ValuesNoCache --> AssertValues["Assert 200, structure, limits"]
ValuesCache --> AssertValuesCache["Assert 200, structure, limits"]
```
<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_streaming.py</strong><dd><code>Re-enable SQL and
add values streaming tests</code>
</dd></summary>
<hr>
tests/api-testing/tests/test_streaming.py
<ul><li>Uncomment and restore <code>test_streaming_sql</code> with
parametrization<br> <li> Add <code>test_values_streaming_endpoint</code>
for non-cache path<br> <li> Add
<code>test_values_streaming_endpoint_cache</code> for cache path<br>
<li> Validate status, totals, and response schema</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7923/files#diff-f15e9b733130f72112380fda658264545435fbf956b08869b0ad5a9435d222f7">+176/-176</a></td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
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
ryeto manage the python version and environment - https://github.com/mitsuhiko/rye - Once installed, simply run the following steps:
rye syncrye 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
alpha1orproductionendpoints.