Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

chore: llm generated tests#197

Merged
infiniteregrets merged 7 commits intomainfrom
m/cli-e2e
Jan 20, 2026
Merged

chore: llm generated tests#197
infiniteregrets merged 7 commits intomainfrom
m/cli-e2e

Conversation

@infiniteregrets
Copy link
Member

No description provided.

@infiniteregrets infiniteregrets requested a review from a team as a code owner January 19, 2026 00:49
@greptile-apps
Copy link

greptile-apps bot commented Jan 19, 2026

Greptile Summary

This PR adds comprehensive test coverage for the S2 CLI tool, including both unit tests and end-to-end integration tests.

Key Changes

  • Added tests/cli.rs with 5 unit tests for CLI validation (invalid URIs, missing tokens, bad basin names, unknown commands)
  • Added tests/e2e.rs with 71 comprehensive E2E tests covering all major CLI operations (basins, streams, data I/O, fencing, configuration)
  • Updated CI workflow to separate unit tests (--lib) from integration tests (--test e2e)
  • Added new integration job that runs E2E tests with S2_ACCESS_TOKEN secret (internal PRs only)
  • Integrated s2-lite testing workflow to validate CLI against local S2 server
  • Added test dependencies: assert_cmd, predicates, serial_test, tempfile

Test Coverage

The E2E tests cover:

  • Basin operations (create, delete, list, configure, reconfigure)
  • Stream operations (create, delete, list, configure, reconfigure)
  • Data operations (append, read, tail, trim, fence)
  • Various formats (text, json, json-base64)
  • Edge cases (empty streams, nonexistent resources, wrong fencing tokens)
  • Advanced features (storage classes, timestamping modes, tail offsets, byte limits)

Confidence Score: 5/5

  • This PR is safe to merge with no concerns
  • The PR adds comprehensive test coverage without modifying any production code. The tests are well-structured, use appropriate test utilities (assert_cmd, serial_test), include proper cleanup, and handle missing credentials gracefully. The CI workflow changes appropriately separate unit from integration tests and add s2-lite validation.
  • No files require special attention

Important Files Changed

Filename Overview
tests/cli.rs Added unit tests for CLI error handling and validation (invalid URIs, missing tokens, bad basin names)
tests/e2e.rs Added comprehensive E2E tests covering basins, streams, data operations, fencing, and configuration
.github/workflows/ci.yml Separated unit and integration tests, added s2-lite integration workflow
Cargo.toml Added test dependencies: assert_cmd, predicates, serial_test, tempfile

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant GH as GitHub Actions
    participant Test as Test Job
    participant Int as Integration Job
    participant S2Lite as S2-Lite Build
    participant SDK as SDK Tests
    
    Dev->>GH: Push to PR/main
    GH->>Test: Start test job
    GH->>Int: Start integration job (if internal PR)
    GH->>S2Lite: Start s2-lite build
    
    Test->>Test: cargo nextest run --lib
    Note over Test: Run unit tests only
    
    Int->>Int: cargo nextest run --test e2e -j 1
    Note over Int: Run E2E tests with S2_ACCESS_TOKEN
    
    S2Lite->>S2Lite: Build s2-lite server binary
    S2Lite->>SDK: Pass server binary
    
    SDK->>SDK: Start s2-lite server on port 8080
    SDK->>SDK: cargo nextest run --test e2e -j 1
    Note over SDK: Run E2E tests against local s2-lite
    
    Test-->>GH: Unit test results
    Int-->>GH: Integration test results
    SDK-->>GH: S2-lite integration results
    
    GH->>GH: Check all jobs (test, lint, s2-lite-integration)
    GH-->>Dev: CI Status (pass/fail)
Loading

@infiniteregrets infiniteregrets changed the title chore: llm generates tests chore: llm generated tests Jan 19, 2026
@infiniteregrets infiniteregrets merged commit c90a985 into main Jan 20, 2026
6 checks passed
@infiniteregrets infiniteregrets deleted the m/cli-e2e branch January 20, 2026 02:16
@greptile-apps greptile-apps bot mentioned this pull request Jan 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant