Skip to content

Add SSH E2E test with container-based approach#143

Merged
linyows merged 3 commits intomainfrom
add-ssh-e2e-test
Jan 12, 2026
Merged

Add SSH E2E test with container-based approach#143
linyows merged 3 commits intomainfrom
add-ssh-e2e-test

Conversation

@linyows
Copy link
Owner

@linyows linyows commented Jan 12, 2026

Summary

  • Add SSH E2E test using Docker container (linuxserver/openssh-server)
  • SSH authentication uses public key instead of password for better security
  • Add cleanup steps for all containers to prevent test failures from leftover containers
  • Fix shell.yml workdir test race condition in /tmp

Changes

testdata/verify-examples.yml

  • Add SSH container test with public key authentication
  • Add cleanup steps before starting containers (HTTP, PostgreSQL, MySQL, SSH)
  • Pull linuxserver/openssh-server image in setup job

examples/ssh.yml

  • Add SSH_KEY_FILE variable support (defaults to ~/.ssh/id_rsa)

examples/shell.yml

  • Fix "Working directory example" to use dedicated test directory
  • Prevents race conditions in /tmp directory

.gitignore

  • Add /testdata/ssh to ignore generated SSH test keys

Test Plan

Run the E2E tests:

./probe testdata/verify-examples.yml

All SSH tests should pass with container-based SSH server.

🤖 Generated with Claude Code

linyows and others added 2 commits January 12, 2026 17:11
- Add SSH server container test using linuxserver/openssh-server
- Generate SSH key pair for testing with public key authentication
- Add cleanup steps for all containers (HTTP, PostgreSQL, MySQL, SSH)
- Update examples/ssh.yml to support SSH_KEY_FILE environment variable
- Fix examples/shell.yml workdir test to avoid /tmp race conditions
- Add testdata/ssh to .gitignore for generated test keys

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

When strict_host_check is false, known_hosts file is not needed.
This was causing CI failures when the file doesn't exist.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions

This comment has been minimized.

@github-actions
Copy link

Code Metrics Report

main (dcea44c) #143 (034e96f) +/-
Coverage 48.5% 48.5% -0.1%
Code to Test Ratio 1:1.1 1:1.1 0.0
Test Execution Time 29s 24s -5s
Details
  |                     | main (dcea44c) | #143 (034e96f) |  +/-  |
  |---------------------|----------------|----------------|-------|
- | Coverage            |          48.5% |          48.5% | -0.1% |
  |   Files             |             52 |             52 |     0 |
  |   Lines             |           5244 |           5244 |     0 |
- |   Covered           |           2547 |           2546 |    -1 |
  | Code to Test Ratio  |          1:1.1 |          1:1.1 |   0.0 |
  |   Code              |          10564 |          10564 |     0 |
  |   Test              |          11955 |          11955 |     0 |
+ | Test Execution Time |            29s |            24s |   -5s |

Code coverage of files in pull request scope (73.1% → 72.0%)

Files Coverage +/- Status
mail/mock_server.go 72.0% -1.1% affected

Reported by octocov

@linyows linyows merged commit 8129e35 into main Jan 12, 2026
7 checks passed
@linyows linyows deleted the add-ssh-e2e-test branch January 12, 2026 11:30
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.

1 participant