Skip to content

test(ssh): improve SSH proxy test coverage#1628

Merged
jescalada merged 17 commits into
finos:mainfrom
fabiovincenzi:ssh-test-coverage
Jul 24, 2026
Merged

test(ssh): improve SSH proxy test coverage#1628
jescalada merged 17 commits into
finos:mainfrom
fabiovincenzi:ssh-test-coverage

Conversation

@fabiovincenzi

Copy link
Copy Markdown
Contributor

Description

Add tests to improve SSH proxy coverage, focusing on the four modules with the most gaps:

  • server.ts: push flow (no-op detection, security chain integration, pack size/chunk limits, timeout), path validation, auth edge cases, debug mode
  • GitProtocol.ts: happy paths for all 4 exported functions
  • sshInternals.ts: all exported functions with failure modes and error messages
  • AgentForwarding.ts : CHANNEL_OPEN_CONFIRMATION handler, lock recovery

Related Issue

Resolves #1586

Checklist

General

Documentation

  • Documentation has been added/updated for any new features (N/A — test-only changes)

Configuration

  • If configuration schema (config.schema.json) was modified (N/A — no config changes)

Tests

  • Tests have been added/updated for new functionality
  • Unit tests pass (npm test)
  • Linting and formatting pass (npm run lint and npm run format:check)
  • Type checks pass (npm run check-types)

@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for endearing-brigadeiros-63f9d0 ready!

Name Link
🔨 Latest commit e249ac5
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/6a6307e93ffa7000083c7e72
😎 Deploy Preview https://deploy-preview-1628.git-proxy.preview.finos.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.41%. Comparing base (d571a17) to head (e249ac5).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1628      +/-   ##
==========================================
+ Coverage   86.31%   90.41%   +4.09%     
==========================================
  Files          87       87              
  Lines        8661     8661              
  Branches     1514     1603      +89     
==========================================
+ Hits         7476     7831     +355     
+ Misses       1155      799     -356     
- Partials       30       31       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fabiovincenzi fabiovincenzi changed the title Ssh test coverage test(ssh): improve SSH proxy test coverage Jul 1, 2026
@fabiovincenzi
fabiovincenzi marked this pull request as ready for review July 3, 2026 09:31
@fabiovincenzi
fabiovincenzi requested a review from a team as a code owner July 3, 2026 09:31

@jescalada jescalada left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent work on getting our coverage back to standard! 🎉

Just a few minor comments/suggestions from me. I'd like to merge this ASAP for the coverage increase, despite conflicts with the Vitest 4 upgrade PR #1564. I'm happy to deal with failing tests later 🙂

Comment thread test/ssh/GitProtocol.test.ts
Comment thread test/ssh/AgentForwarding.test.ts Outdated
Comment thread test/ssh/server.test.ts
Comment thread test/ssh/GitProtocol.test.ts Outdated
Comment thread test/ssh/GitProtocol.test.ts Outdated
Comment thread test/ssh/GitProtocol.test.ts Outdated

@jescalada jescalada left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! 👍🏼

@jescalada
jescalada enabled auto-merge July 24, 2026 06:36
@jescalada
jescalada merged commit b44f5ee into finos:main Jul 24, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve SSH Test Coverage

2 participants