mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
### **PR Type**
Tests, Enhancement
___
### **Description**
- Add comprehensive dynamic template tests
- Introduce reusable validation utilities
- Parameterize edge and nested cases
- Standardize waits and identifiers
___
### Diagram Walkthrough
```mermaid
flowchart LR
Consts["Add constants (waits, limits)"]
Utils["Add utils: time window, query builder, validator, enabler"]
DynamicTest["Enhance dynamic template test"]
ComplexTests["Add complex, special-char, edge, nested tests"]
Perf["Add performance and cleanup tests"]
Consts -- "used by" --> Utils
Utils -- "reused in" --> DynamicTest
Utils -- "reused in" --> ComplexTests
Utils -- "reused in" --> Perf
```
<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_pipeline_dynamic.py</strong><dd><code>Expand
pipeline dynamic template tests and utilities</code>
</dd></summary>
<hr>
tests/api-testing/tests/test_pipeline_dynamic.py
<ul><li>Add constants and safety helpers.<br> <li> Add reusable
validation and enable helpers.<br> <li> Expand tests: complex, special
chars, edge, nested.<br> <li> Add performance and cleanup tests.</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/8882/files#diff-0bbefbbf7a34e3414a0aadd1963ffe6a2af8b5df4d619076207e361b2a42bcb1">+774/-49</a></td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
---------
Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
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.