Files
openobserve/tests/api-testing
Loakesh IndiranandBhargav 1bd1caa10a fix: limit, hist_alignment by factors of 24 hrs, order_by (#7895)
### **User description**
Fixes:
- `total` count when limit is reached for limit queries in http2
streaming
- Search response to return an array of `order_by`
```
eg: [["x_axis", "asc"], ["y_axis", "asc"]]
```
- Check and validate the histogram interval provided either as a query
payload or the histogram query, to generate partitions in aligned 24 hr
manner to avoid duplicate.


___

### **PR Type**
Enhancement, Bug fix, Tests


___

### **Description**
- Add `order_by_metadata` to search responses

- Validate histogram intervals as 24h factors

- Fix total count after results truncation

- Implement frontend sorting with metadata


___

### Diagram Walkthrough


```mermaid
flowchart LR
  SQL["SQL generation"] -- "validate hist interval" --> R["Response (order_by metadata)"]
  R -- "merge response" --> C["Cache module"]
  R -- "set result" --> H["HTTP handler"]
  H -- "streaming data" --> S["Streaming exec"]
  S -- "apply sort metadata" --> U["Frontend UI"]
```



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

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody></tr></tbody></table>

</details>

___

---------

Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
2025-08-08 17:50:20 +05:30
..
2025-07-31 14:31:33 +08:00
2025-07-31 14:31:33 +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.