CLI test: add HTTP response check for created site#4000
Open
gavande1 wants to merge 4 commits into
Open
Conversation
1 task
Collaborator
📊 Performance Test ResultsComparing 44363d0 vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
gcsecsey
reviewed
Jul 1, 2026
Comment on lines
+46
to
+57
| [ | ||
| 'site', | ||
| 'create', | ||
| '--name', | ||
| siteName, | ||
| '--path', | ||
| sitePath, | ||
| '--wp', | ||
| 'latest', | ||
| '--skip-browser', | ||
| '--skip-log-details', | ||
| ], |
Member
There was a problem hiding this comment.
I got this flagged by Claude:
Because this command no longer passes
--runtime sandbox, site create uses the CLI default native runtime. The e2e harness only provisions bundled WordPress, not php-bin, so this test can download PHP or fail in offline/release environments instead of staying hermetic like the other CLI e2e tests.
As a temporary measure, we could adjust the test to pass the --runtime sandbox parameter, but as a long-term solution, I think we should extend the e2e harness to download PHP as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Related issues
How AI was used in this PR
Claude was used to write the code and explore the solution. The author reviewed it manually.
Proposed Changes
Follow-up to the CLI e2e tests in #3947. The
site createtest only asserted persisted state on disk. This adds a real check: after creating and starting a site, the test requests its homepage and confirms a 200 with HTML, so it now fails if a created site cannot be served.This does not cover the custom-domain and HTTPS case, which cannot run in an isolated, headless test. See the discussion in #3947.
Testing Instructions
npm run cli:build.npm test -- apps/cli/commands/site/tests/create.e2e.test.ts --tagsFilter='e2e'and confirm both tests pass.--tagsFilter='!e2e'and confirm the tests are skipped, so the fast suite is unaffected.Pre-merge Checklist