mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
### **PR Type**
Tests
___
### **Description**
- Add regression tests for substr subqueries
- Validate env flags causing Utf8View panic
- Add alternative query pattern coverage
- Verify data content and string functions
___
### Diagram Walkthrough
```mermaid
flowchart LR
A["Env flags set via monkeypatch"] -- "enable JOIN_MATCH_ONE, UTF8_VIEW" --> B["Execute queries against stream_pytest_data"]
B -- "substr + IN subquery" --> C["Assert 200, validate hits"]
B -- "alternative IN/JOIN/CONCAT/length" --> D["Cross-validate no Utf8View error"]
B -- "data verification" --> E["Inspect container names/prefixes"]
```
<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_subquery_join_match.py</strong><dd><code>Add
regression and coverage tests for substr subqueries</code>
</dd></summary>
<hr>
tests/api-testing/tests/test_subquery_join_match.py
<ul><li>Add end-to-end regression tests reproducing Utf8View panic<br>
<li> Set env vars via monkeypatch for failing conditions<br> <li> Cover
substr IN, JOIN, CONCAT, and length() variants<br> <li> Add data
verification and structural assertions on hits</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8818/files#diff-facac795b55980509f22b59fec9090910a8eb2c8d442936114c4b11f11008152">+564/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
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.