Skip to content

refactor(e2e): adopt CopyTestdata for open-coded temp-dir fixtures - #1592

Merged
skevetter merged 1 commit into
mainfrom
refactor/e2e-adopt-copytestdata
Oct 19, 2026
Merged

skevetter merged 1 commit into
mainfrom
refactor/e2e-adopt-copytestdata

Conversation

@skevetter

@skevetter skevetter commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adopt framework.CopyTestdata(path, initialDir) at 21 open-coded sites across 12 spec files. Each site was tempDir, err := framework.CopyToTempDir(path) + framework.ExpectNoError(err) + ginkgo.DeferCleanup(framework.CleanupTempDir, initialDir, tempDir).

Why

CopyTestdata (e2e/framework/workspace.go) performs the same copy, failure check, and cleanup registration in the same order. Removes boilerplate and matches the existing adoption in tests/build and ssh specs. Only observable difference: assertion failure reports the caller line via ExpectNoErrorWithOffset(1, …). Later err uses changed from = to := where err was no longer declared (ide, browser_returns, machine, dockerinstall, provider_docker, provider_kubernetes).

Validation

  • go build ./e2e/..., go vet ./e2e/...: pass
  • gofmt -l on changed files: clean
  • mise run cli:format: applied (3 lines re-wrapped by golines)
  • mise run cli:lint:ci: 0 issues
  • go test -count=1 ./e2e/framework/...: pass
  • go tool ginkgo --dry-run ./e2e: 503/503 specs
  • E2E specs not executed (need devsy runtime and docker).

CodeRabbit CLI

coderabbit review --agent --committed --base-commit d710ebb failed 3 times with WebSocket closed (recoverable). Auth OK. No findings.

Auto-merge

Eligible: no (CodeRabbit gate not completed). Non-test source changed lines: 0; spec lines changed: 116 (39 insertions, 77 deletions).

Labels touched

ci, docker-context, docker-install, down, extends-up, gpg, ide, machine, up-handle-errors, up-provider-docker, up-provider-kubernetes.

Next

Remaining open-coded sites, not in this PR (candidates, not yet verified): up/up.go, up/provider_kubernetes_restricted.go, up/provider_kubernetes_dockerless_path.go, up/provider_kubernetes_ssh_agent.go, up/provider_microsandbox.go, up/provider_microsandbox_dockerless.go, up/provider_microsandbox_prebuilds.go, up/provider_podman_rootful_basic.go, up/provider_podman_rootless_exec.go, up-features/wsl.go. Excluded: e2e/tests/ssh/, e2e/tests/up-docker-compose/, and helpers returning errors (up/helper.go, up-docker-compose/helper.go).

Summary by CodeRabbit

  • Refactor
    • End-to-end test scenarios now use a consistent approach to prepare test workspaces across CI, Docker, IDE, machine, and provider flows.
    • Workspace cleanup remains in place, and the scenarios’ operations and assertions are unchanged. These updates affect test setup only; no changes to application behavior are included.

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

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

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

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

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

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 42054039-d0ed-4c31-8cec-ae1195950211
📥 Commits

Reviewing files that changed from the base of the PR and between d710ebb and bc5a8d4.

📒 Files selected for processing: 12
  • e2e/tests/ci/ci.go
  • e2e/tests/dockercontext/dockercontext.go
  • e2e/tests/dockerinstall/dockerinstall.go
  • e2e/tests/down/down.go
  • e2e/tests/extends-up/extends_up.go
  • e2e/tests/ide/browser_returns.go
  • e2e/tests/ide/ide.go
  • e2e/tests/machine/machine.go
  • e2e/tests/up/handles_errors.go
  • e2e/tests/up/microsandbox_session.go
  • e2e/tests/up/provider_docker.go
  • e2e/tests/up/provider_kubernetes.go

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

📝 Walkthrough

E2E tests now copy testdata with framework.CopyTestdata into initialDir instead of using CopyToTempDir. They remove temporary-directory cleanup registrations. Existing workspace cleanup and test operations remain.

Changes: E2E testdata setup

Layer / File(s) Summary
Update fixture setup
e2e/tests/ci/ci.go, e2e/tests/dockercontext/dockercontext.go, e2e/tests/dockerinstall/dockerinstall.go, e2e/tests/down/down.go, e2e/tests/extends-up/extends_up.go, e2e/tests/ide/*, e2e/tests/machine/machine.go, e2e/tests/up/*
Tests now use framework.CopyTestdata with initialDir instead of CopyToTempDir. The changed setup removes copy-error checks and CleanupTempDir registrations; existing workspace cleanup and test flows remain.

Priority: ⬇️ Low

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

Change: Refactor

Merge Risk: ⚪ Minimal · up to bc5a8

The fixture setup now delegates copying and cleanup to a shared helper without an identified behavior change. E2E specs were not run because they require the devsy runtime and Docker; the reported build, vet, and dry-run checks are favorable.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Description check Warning The description explains the change, motivation, validation results, exclusions, and known limitations. However, it does not use the repository template and omits the issue reference, type-of-change s… Update the description to include the required template sections. Add a Fixes/Refs entry or state "none", select Refactor (no behavior change), complete the AI assistance and acknowledgement fields, record testing and manual verification de…
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 12 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main refactor: replacing open-coded temporary-directory fixtures with CopyTestdata.
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 explains the change, motivation, validation results, exclusions, and known limitations. However, it does not use the repository template and omits the issue reference, type-of-change selection, AI assistance details, checklist confirmations, and manual verification section.

Resolution

Update the description to include the required template sections. Add a Fixes/Refs entry or state "none", select Refactor (no behavior change), complete the AI assistance and acknowledgement fields, record testing and manual verification details, and complete the checklist items.

  • Fix all pre-merge checks with AI
✨ 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 marked this pull request as ready for review October 19, 2026 17:31
@mergify

mergify Bot commented Oct 19, 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.

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@skevetter

Copy link
Copy Markdown
Contributor Author

Not auto-merging: all 101 checks pass on bc5a8d4, but CodeRabbit has not reviewed this SHA (GitHub status is the stale 'skipped: draft' one, @coderabbitai review got no response, local CLI fails with WebSocket closed). Needs human.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@skevetter, passing checks do not confirm that CodeRabbit reviewed bc5a8d4fd. The “Already reviewed” response also does not establish review coverage for that SHA.

Human review remains appropriate before merging. To request a fresh review of the entire changeset, post @coderabbitai full review.

You are interacting with an AI system.

@skevetter
skevetter merged commit 4a16b8a into main Oct 19, 2026
111 checks passed
@skevetter
skevetter deleted the refactor/e2e-adopt-copytestdata branch October 19, 2026 18:41
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