Skip to content

fix(e2e): correct runServices error assertion#224

Merged
skevetter merged 1 commit into
mainfrom
b979-23ea-fix-runservices-assertion
May 5, 2026
Merged

fix(e2e): correct runServices error assertion#224
skevetter merged 1 commit into
mainfrom
b979-23ea-fix-runservices-assertion

Conversation

@skevetter

@skevetter skevetter commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix broken E2E test assertion for invalid runServices validation
  • The test was checking err.Error() which only contains the exit code ("exit status 1"), not the validation message
  • The runServices validation error is written to stderr by the CLI, so the test now checks stderr directly for "nonexistent-service"

Summary by CodeRabbit

  • Tests
    • Improved error validation for service initialization scenarios.

The E2E test for invalid runServices was asserting on err.Error() which
only contains the exit code, not the validation message. The validation
error is written to stderr by the CLI. Check stderr directly instead.
@netlify

netlify Bot commented May 4, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 07caaff
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/69f9318697c5ca0008e65b01

@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 193967f8-2ca2-438a-ba68-715bce80788c

📥 Commits

Reviewing files that changed from the base of the PR and between be8aeac and 07caaff.

📒 Files selected for processing (1)
  • e2e/tests/up-docker-compose/up_docker_compose.go

📝 Walkthrough

Walkthrough

A single e2e test for invalid runServices in docker-compose scenarios was refactored to use explicit workspace setup with command execution (setupWorkspace + Devsy up --debug --ide none) instead of combined setup, and to validate both error presence and stderr content for the expected error message.

Changes

E2E Test Refactoring

Layer / File(s) Summary
Test Setup & Assertion
e2e/tests/up-docker-compose/up_docker_compose.go (lines 505–515)
Test "invalid runServices returns error" changed from setupAndStartWorkspace to setupWorkspace, then explicitly executes Devsy up --debug --ide none and asserts both err != nil and stderr contains "nonexistent-service".

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes


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 and usage tips.

@github-actions github-actions Bot added the size/s label May 4, 2026
@skevetter
skevetter marked this pull request as ready for review May 5, 2026 00:46
@skevetter
skevetter enabled auto-merge (squash) May 5, 2026 00:46
@skevetter
skevetter merged commit 4465aa9 into main May 5, 2026
54 checks passed
@skevetter
skevetter deleted the b979-23ea-fix-runservices-assertion branch May 5, 2026 00:46
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