orchard/internal/tests
Fedor Korotkov 6fe523ef69
Add pagination support for listing VM events (#386)
* Add pagination support for listing VM events

Introduced a paginated event listing API, added support for pagination parameters in the request, and included cursor-based navigation using headers. Relevant tests and Badger store implementations were updated to support the new logic.

* Remove support for ordering VM events

Dropped `ListOrder` type, `order` query parameter, and related logic for ordering VM events. Updated tests, API schema, and Badger store to reflect the removal.

* Remove invalid VM events ordering test

Deleted a test case for invalid VM events ordering since the `order` query parameter and related functionality have been removed.

* Add support for ordering VM events

Implemented `order` query parameter for specifying sort order (ascending/descending) of VM events. Updated API schema, Badger store, and added related tests.

* Add support for limiting and ordering VM logs

Introduced `--limit` and `--order` flags for controlling the number of log lines and their sort order (ascending/descending). Updated API client to handle new options.

* Update internal/controller/store/badger/badger_events.go

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

* fix: address PR review feedback

- switch logs CLI to --tail with desc ordering
- reuse ParseLogsOrder in controller with helpful errors
- always use ListEventsPage and scope event cursors
- move events pagination coverage to integration test

🤖 Generated with [Codex](https://chatgpt.com/codex)

Co-Authored-By: Codex <codex@openai.com>

* refactor: simplify prefix trimming and improve error formatting

- Replaced manual prefix check with `bytes.TrimPrefix` in Badger store.
- Enhanced error message formatting in VM logs controller.

* fix: address PR review feedback

- use suggested reverse seek in badger events pagination
- add events pagination client helper and use it in integration test

🤖 Generated with [Codex](https://chatgpt.com/codex)

Co-Authored-By: Codex <codex@openai.com>

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
Co-authored-by: Codex <codex@openai.com>
2026-01-22 09:22:53 -05:00
..
devcontroller Introduce WebSocket-based RPC v2 (#239) 2025-01-30 17:33:32 +04:00
testdata Support for sharing files with the host system (#103) 2023-07-04 18:10:53 +04:00
wait Orchard Controller: implement an SSH server that acts as a jump host (#179) 2024-06-11 19:32:45 +04:00
events_pagination_test.go Add pagination support for listing VM events (#386) 2026-01-22 09:22:53 -05:00
implicit_cpu_memory_test.go Allow creating VMs with implicit CPU and memory (#243) 2025-02-06 00:50:01 +04:00
integration_test.go Worker: define VM interface and make tart.VM conform to it (#388) 2026-01-21 18:57:22 +01:00
ip_endpoint_test.go ghcr.io/cirruslabs/macos-sequoia-base:latest for everything (#344) 2025-09-25 20:43:53 +04:00
labels_test.go Support scheduling by labels (#244) 2025-02-06 18:05:36 +04:00
scheduler_profile_test.go "--scheduler-profile" option to allow different orchestration patterns (#224) 2024-11-28 20:07:46 +04:00
spec_update_test.go Worker: define VM interface and make tart.VM conform to it (#388) 2026-01-21 18:57:22 +01:00
sshserver_test.go ghcr.io/cirruslabs/macos-sequoia-base:latest for everything (#344) 2025-09-25 20:43:53 +04:00