Skip to content

fix: update integration tests for paginated JSON schema#78

Merged
designcode merged 2 commits intomainfrom
fix/integration-tests-json-schema
Apr 8, 2026
Merged

fix: update integration tests for paginated JSON schema#78
designcode merged 2 commits intomainfrom
fix/integration-tests-json-schema

Conversation

@designcode
Copy link
Copy Markdown
Collaborator

@designcode designcode commented Apr 8, 2026

Summary

  • Update 2 integration tests that expected flat JSON arrays ([...]) to use the new paginated schema ({ items: [...] })
  • Fixes: should list buckets with --format json and should list snapshots with --format json
  • The 3 snapshot-version test failures were cascading from the snapshots JSON test not extracting snapshotVersion correctly

Test plan

  • Unit tests pass (542)
  • CI integration tests should now pass

🤖 Generated with Claude Code


Note

Low Risk
Low risk because changes are limited to test assertions and JSON parsing logic to match a new { items: [...] } response shape; no production code paths are modified.

Overview
Updates test/cli.test.ts to expect paginated JSON output ({ items: [...] }) instead of a top-level array for buckets list --format json and snapshots list --format json.

Adjusts the stale test-bucket sweeper and snapshot version extraction to read from parsed.items, preventing cascading failures in snapshot-version-dependent tests.

Reviewed by Cursor Bugbot for commit 0e075ee. Bugbot is set up for automated code reviews on this repo. Configure here.

JSON output from list commands now returns { items: [...] } instead of
a flat array. Update the two integration tests that parsed JSON output
as flat arrays to use parsed.items instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2e6551c. Configure here.

The beforeAll cleanup also parsed buckets list JSON as a flat array.
Silently failed in the catch block, leaving stale test buckets.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@designcode designcode merged commit 7226291 into main Apr 8, 2026
3 checks passed
@designcode designcode deleted the fix/integration-tests-json-schema branch April 8, 2026 18:49
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

🎉 This PR is included in version 2.16.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants