Skip to content

test: enable gateway test coverage#487

Merged
jesseturner21 merged 2 commits intomainfrom
fix/gateway-tests-and-cli-bugs
Mar 4, 2026
Merged

test: enable gateway test coverage#487
jesseturner21 merged 2 commits intomainfrom
fix/gateway-tests-and-cli-bugs

Conversation

@aidandaly24
Copy link
Contributor

@aidandaly24 aidandaly24 commented Mar 3, 2026

Description

Enables comprehensive test coverage for the gateway integration feature. All gateway tests were previously skipped (describe.skip) and several contained pre-alpha assumptions that no longer match the implementation.

Changes:

  • Unskip all 4 gateway test files (add-gateway, add-gateway-target, remove-gateway, remove-gateway-target)
  • Update tests from pre-alpha create-new path to existing-endpoint path (the only user-facing flow)
  • Remove tests for non-existent add bind gateway command and create-new-only validation
  • Add validation tests: rejects create-new source, requires endpoint, invalid OAuth discovery URL
  • Add unit test for auto-create OAuth credential flow in handleAddGatewayTarget
  • Add unit tests for getGatewayEnvVars (previously zero coverage)
  • Add integration test for full gateway lifecycle (add gateway → add target with Exa MCP endpoint → remove target → remove gateway)

Depends on #

Related Issue

Closes #

Documentation PR

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe): Test coverage for existing gateway feature

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@aidandaly24 aidandaly24 requested a review from a team March 3, 2026 20:05
@github-actions github-actions bot added the size/m PR size: M label Mar 3, 2026
@aidandaly24 aidandaly24 closed this Mar 3, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 3, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 46.52% 3540 / 7608
🔵 Statements 46.1% 3733 / 8097
🔵 Functions 48.24% 700 / 1451
🔵 Branches 50.18% 2315 / 4613
Generated in workflow #845 for commit 7d83906 by the Vitest Coverage Report Action

@aidandaly24 aidandaly24 changed the title fix: gateway-target CLI bugs and enable gateway test coverage test: enable gateway test coverage Mar 4, 2026
@aidandaly24 aidandaly24 reopened this Mar 4, 2026
@aidandaly24 aidandaly24 marked this pull request as draft March 4, 2026 15:04
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 4, 2026
- Unskip all 4 gateway test files (add/remove gateway/gateway-target)
- Update validGatewayTargetOptions fixture to existing-endpoint
- Remove create-new path tests (not user-facing yet)
- Add tests: rejects create-new source, requires endpoint, invalid
  OAuth discovery URL, auto-create OAuth credential
- Rewrite cascade/removal tests to use --endpoint instead of
  non-existent 'add bind gateway' and --language/--host flags
- Add end-to-end gateway lifecycle test (add gateway, add target with
  Exa MCP endpoint, remove target, remove gateway)
- Add unit tests for getGatewayEnvVars (dev environment setup)
@aidandaly24 aidandaly24 force-pushed the fix/gateway-tests-and-cli-bugs branch from 3b079e9 to 7d83906 Compare March 4, 2026 19:27
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 4, 2026
@aidandaly24 aidandaly24 marked this pull request as ready for review March 4, 2026 19:29
Copy link
Contributor

@jesseturner21 jesseturner21 left a comment

Choose a reason for hiding this comment

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

lgtm

@jesseturner21 jesseturner21 merged commit 41365e4 into main Mar 4, 2026
18 checks passed
@jesseturner21 jesseturner21 deleted the fix/gateway-tests-and-cli-bugs branch March 4, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants