Skip to content

refactor(e2e): share rename workspace setup - #1729

Open
skevetter wants to merge 1 commit into
mainfrom
refactor/e2e-rename-fixtures
Open

skevetter wants to merge 1 commit into
mainfrom
refactor/e2e-rename-fixtures

Conversation

@skevetter

@skevetter skevetter commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extracts the repeated single-workspace setup in e2e/tests/rename/rename.go into the suite-local helper setupNoDevcontainerWorkspace. It runs the same steps in the same order: delete the named Docker provider with --ignore-not-found, copy the no-devcontainer fixture, add and use the provider, then devsy up --id <workspace>. It returns the framework for the spec's own assertions.

Applied to specs 1, 2, 5, and 6. Spec 3 (two workspaces, duplicate name) and spec 4 (non-existent workspace, no setup) are unchanged.

Why

Four specs repeated the same 20-line setup block verbatim. The helper keeps spec names, labels, timeouts, commands, assertions, and cleanup semantics unchanged.

The helper stays local to the rename package. framework.SetupDockerProvider hardcodes the docker provider and ignores delete errors, so reusing it would change behavior.

Validation

  • mise run cli:format: no changes beyond rename.go.
  • mise run cli:lint:ci: 0 issues.
  • go vet ./e2e/...: pass.
  • go test ./e2e/framework/...: pass.
  • ginkgo --label-filter rename --dry-run: 6 of 511 specs selected.
  • mise run cli:test:e2e:suite rename (Docker 29.8.2, local darwin/arm64): 6 passed, 0 failed, 57.4 s.

CodeRabbit CLI

coderabbit review --agent --committed on 9b8c9ac (rebased onto f5a21e3) completed with 0 findings (reviewed e2e/tests/rename/rename.go). Earlier attempts hit the free OSS rate limit.

Auto-merge

Eligibility: likely eligible, pending green CI and the CodeRabbit retry.

  • Files changed: 1 (e2e/tests/rename/rename.go), within the 12-file cap.
  • Changed lines: +30 / -60 (90 total) in a single e2e spec file.
  • Framework or helper changes: 0 lines.
  • Counted against the 300-line cap: 45 (90 spec lines at half weight). Zero non-test source lines.

Not enabled. Draft PR for human review; no merge requested.

Next

Extract the repeated Eventually(... "Running") block into a helper in a follow-up.

Summary by CodeRabbit

  • Tests
    • Updated automated checks for renaming stopped and running workspaces, handling invalid names, and updating configuration. No end-user behavior changes are included in this update.

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

netlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

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

@netlify

netlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 9b8c9ac
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6adfad3078dd2e54be5de58a

@coderabbitai

coderabbitai Bot commented Oct 26, 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: ba54374b-28e0-4bfd-a7fb-bae9bc5a1790
Commits

Reviewing files that changed from the base of the PR and between f5a21e3 and 9b8c9ac.

Files selected for processing: 1
  • e2e/tests/rename/rename.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

Four rename tests now use a shared helper to initialize the framework, configure the Docker provider, copy test data, and create a workspace. The tests declare errors at their subsequent operations.

Changes: Rename test setup

Layer / File(s) Summary
Shared workspace setup and test integration
e2e/tests/rename/rename.go
A new helper performs common framework, provider, test-data, and workspace setup. Four rename tests call the helper. Their rename checks remain unchanged.

Priority: Low

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

Change: Refactor

Merge Risk: Minimal · up to 9b8c9

The change consolidates repeated rename-test setup without an identified behavior change. It is mergeable subject to normal checks.

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 refactoring change: sharing rename workspace setup.
Description check Passed The description clearly explains what changed, why it changed, which specs were affected, preserved behavior, and the validation performed. It omits the template's formal Type of change, AI assistance…
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, which specs were affected, preserved behavior, and the validation performed. It omits the template's formal Type of change, AI assistance, Checklist, and Notes for reviewers sections, but the core information is 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-rename-fixtures branch from cc22b60 to 9b8c9ac Compare October 26, 2026 19:42
@skevetter
skevetter marked this pull request as ready for review October 26, 2026 20:43

Copy link
Copy Markdown
Contributor Author

@greptileai review

@mergify

mergify Bot commented Oct 26, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@greptile-apps

greptile-apps Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Summary

Extracts repeated setup from four rename specs into setupNoDevcontainerWorkspace.

  • Four rename specs now share one workspace setup helper.

No actionable issues found. No tests were run during this review.

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

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