Skip to content

refactor(e2e): share ssh workspace setup helper - #1695

Merged
skevetter merged 1 commit into
mainfrom
refactor/e2e-framework-cleanup-20261025
Oct 25, 2026
Merged

skevetter merged 1 commit into
mainfrom
refactor/e2e-framework-cleanup-20261025

Conversation

@skevetter

@skevetter skevetter commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Replace six duplicated Docker workspace setup blocks in e2e/tests/ssh/ssh.go with the local setupSSHWorkspace helper.
  • Keep spec names, labels, fixtures, timeouts, assertions, and cleanup order unchanged.
  • Leave the forward-port spec inline because its cleanup asserts the delete error.

Why

Six specs repeated copying a fixture, creating the framework, configuring Docker, and registering cleanup. The helper shares that setup while each spec keeps its SSH key, GPG, and DevsyUp behavior. This removes 44 net lines and gives the repeated fixture setup one maintenance point.

Validation

  • mise run cli:format: pass
  • mise run cli:lint:ci: pass, 0 issues
  • go vet ./e2e/...: pass
  • go test ./e2e/framework/...: pass
  • mise run cli:test:e2e:build: pass
  • mise run cli:test:e2e:suite ssh: 9 passed, 0 failed, 501 filtered (7 ssh and 2 gh-forwarding specs)
  • Ginkgo dry-run with the ssh label filter: 9 specs listed, titles unchanged
  • PR CI: Test ssh on ubuntu-latest passed; CI Success passed. All 93 workflow jobs succeeded.

CodeRabbit CLI

One minor finding: the helper preserves the existing ignored DevsyWorkspaceDelete error behavior. No change made because surfacing that error would change behavior in six specs; consider separately.

Auto-merge

Eligible: yes. Changed non-test source lines: 0. One E2E spec file.

Next

  • Consider a separate behavior-change PR for workspace-delete error assertions.

Summary by CodeRabbit

  • Tests
    • Standardized setup across SSH end-to-end tests, including fixture preparation and cleanup. The tests retain their existing startup behavior and test-specific configuration. These changes affect test infrastructure only and do not add or alter user-facing product functionality.

@skevetter skevetter added the e2e-refactor e2e refactor label Oct 25, 2026
@netlify

netlify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 1872903
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6adda72524b67e1c503f486f

@netlify

netlify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 1872903
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6adda72608c2724ebd8da5d0

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dfc2fa02-6bf2-41f8-85c3-2cdfd982ab62
Commits

Reviewing files that changed from the base of the PR and between f5e8f5c and 1872903.

Files selected for processing: 1
  • e2e/tests/ssh/ssh.go

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

Walkthrough

The SSH end-to-end tests now use setupSSHWorkspace for fixture copying, Docker provider setup, and cleanup registration. The tests retain their existing startup calls and test-specific setup.

Changes: SSH test workspace setup

Layer / File(s) Summary
Shared workspace setup
e2e/tests/ssh/ssh.go
The new helper prepares a fixture workspace, configures the Docker provider, registers cleanup, and returns the framework and fixture directory. Six tests use the helper and retain their test-specific setup.

Priority: Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: atty303

Merge Risk: Minimal · up to 18729

The SSH setup refactor preserves the existing fixture, startup, and cleanup behavior.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title is concise, specific, and accurately describes the main refactor: sharing the SSH workspace setup helper.
Description check Passed The description clearly explains what changed, why it changed, and how it was validated. It also records the preserved cleanup behavior and review follow-up. Some template sections, such as the formal…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description clearly explains what changed, why it changed, and how it was validated. It also records the preserved cleanup behavior and review follow-up. Some template sections, such as the formal type, AI-assistance, checklist, and issue-reference fields, are not included, but the description is otherwise substantially complete.

Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@skevetter
skevetter force-pushed the refactor/e2e-framework-cleanup-20261025 branch from 100fa2f to 1872903 Compare October 25, 2026 06:52
@skevetter
skevetter marked this pull request as ready for review October 25, 2026 08:16

Copy link
Copy Markdown
Contributor Author

@greptileai review

@mergify

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge; the extracted helper preserves the six specs’ behavior.

Summary

Replaces six repeated SSH workspace setup blocks with setupSSHWorkspace.

  • Six SSH specs now share the same Docker workspace setup.

Reviews (1) · Last reviewed commit: "refactor(e2e): share ssh workspace setup..." · Reviewed by Greptile

@skevetter
skevetter merged commit 401c009 into main Oct 25, 2026
115 checks passed
@skevetter
skevetter deleted the refactor/e2e-framework-cleanup-20261025 branch October 25, 2026 08:22
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.

1 participant