mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 08:09:27 +00:00
### **PR Type** Bug fix ___ ### **Description** - Include role in user-org tuple creation - Pass `org.role` to `get_user_org_tuple` - Add default role in custom role mapping ___ ### **Changes diagram** ```mermaid flowchart LR PT["process_token"] -- "pass role" --> GUT["get_user_org_tuple"] MG["map_group_to_custom_role"] -- "pass default role" --> GUT ``` ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>jwt.rs</strong><dd><code>Add role parameter to tuple function</code> </dd></summary> <hr> src/handler/http/auth/jwt.rs <li>Added role parameter to <code>get_user_org_tuple</code><br> <li> Passed <code>org.role</code> in <code>process_token</code><br> <li> Included default role in custom role mapping </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7560/files#diff-232cab74f4cbf135af424744272e17732fbda8ac005d33c0acb4597e65479d02">+15/-3</a> </td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></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.