mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
### **User description**
Add comprehensive API tests for backfill core functionality:
- Basic backfill job creation and status retrieval
- Backfill execution with data verification
- List all backfill jobs for organization
- Pause and resume backfill jobs
- Delete backfill jobs
- Invalid time range validation
- Non-existent pipeline handling
- Progress tracking verification
- Non-existent job 404 handling
- Realtime pipeline rejection (only scheduled pipelines allowed)
___
### **PR Type**
Tests, Enhancement
___
### **Description**
- Add comprehensive backfill pipeline API tests
- Creation, execution, listing, pause/resume, delete, validation
- Provide test utilities for ingestion and pipelines
- Configure CI env var for backdated ingestion
___
<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_backfill.py</strong><dd><code>Add pipeline
backfill API tests</code>
</dd></summary>
<hr>
tests/api-testing/tests/test_backfill.py
<ul><li>Add a suite of 10+ backfill API tests<br> <li> Implement helpers
for log ingestion and pipelines<br> <li> Test job lifecycle: create,
status, execute, pause/resume, delete<br> <li> Validate time range,
non-existent resources, progress tracking</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10177/files#diff-644fee0c3348626de59a5b38627f499f0c57afcffcc1a203533ff5fefa5df6dd">+706/-0</a>
</td>
</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>api-testing.yml</strong><dd><code>Allow backdated
ingestion in CI</code>
</dd></summary>
<hr>
.github/workflows/api-testing.yml
<ul><li>Add ZO_INGEST_ALLOWED_UPTO env var<br> to allow backdated data
ingestion</ul>
</details>
</td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10177/files#diff-bf87f46624aaa9c4f1d9faa033baf531a543f2d4ac188cd64e9ab3febfee8f9e">+1/-0</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
</details>
___
---------
Co-authored-by: Claude <noreply@anthropic.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.