test: comprehensive coverage — 87 test files, 378 tests, 3% to 100%#43
Open
JoshSalway wants to merge 3 commits intolaravel:mainfrom
Open
test: comprehensive coverage — 87 test files, 378 tests, 3% to 100%#43JoshSalway wants to merge 3 commits intolaravel:mainfrom
JoshSalway wants to merge 3 commits intolaravel:mainfrom
Conversation
Increases test coverage from 3/87 commands (~3%) to 43/87 (~49%), following the Laravel Forge CLI pattern of one test file per command. Commands now tested: - Auth: auth, auth:token - Application: create, get, update, delete - Environment: create, get, list, update, delete, variables - Domain: create, delete, list, verify - Database: cluster create/delete/list, database create/delete/list - Cache: create, delete, list - Bucket: create, delete, list - Instance: create, delete, list, update - WebSocket: cluster create/delete/list, application create/delete - Background Process: create, delete, list - Command: run, list Bugs documented in tests (skipped with references to PR laravel#42): - 7 commands catch wrong RequestException class (Illuminate vs Saloon) - ApplicationUpdate has no error handling for API failures - DatabaseDelete catches Throwable which swallows CommandExitException - DomainCreate missing non-interactive defaults - CacheDelete/BucketDelete missing --json option Refs laravel#41 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 16, 2026
Open
…3 files Coverage now at ~95% of commands (80/87). Remaining untested: Browser, Dashboard, Completions (utility commands that open browser/generate shell), Ship (tested via refactor PR laravel#54), and DeployMonitor (complex polling). New test files cover: - Application: list (expanded) - BackgroundProcess: get, update - Bucket: get, update - BucketKey: create, delete, get, list, update - Cache: get, types, update - Command: get - DatabaseCluster: get, update - Database: get, open, restore create - DatabaseSnapshot: create, delete, get, list - DedicatedCluster: list - Deployment: get, list - DeployMonitor: basic smoke test - Domain: get, update - EnvironmentLogs: basic test - Instance: get, sizes - IpAddresses: list, filter - AuthToken: list, reveal - WebSocket: app get/list/update, cluster get/update - RepoConfig: git detection Additional bugs found and filed: - laravel#55: DatabaseRestoreCreate completely broken (TypeError) - laravel#56: DatabaseSnapshotCreate missing CLI options - laravel#57: DatabaseClusterUpdate unusable non-interactively 352 tests, 381 assertions, 0 failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nded tests Brings total to 87 test files, 378 tests, 409 assertions — covering all 87 commands (~100% command coverage). New tests: - ShipTest (6 tests) — full non-interactive workflow, custom flags, error cases - BrowserTest (3 tests) — URL resolution, Process mock - DashboardTest (2 tests) — URL resolution, Process mock - CompletionsTest (4 tests) — bash/zsh/fish completion scripts - DeployMonitorTest expanded (3+1 skipped) — no-app detection - EnvironmentLogsTest expanded (7 tests) — time filters, JSON output - DomainUpdateTest expanded (4 tests) — verification methods, JSON, name lookup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced Mar 16, 2026
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.
Summary
Comprehensive test coverage for all 87 CLI commands, following the Laravel Forge CLI pattern of one test file per command. Increases coverage from 3% to 100%.
Refs #41
Context
The Laravel Forge CLI has a feature test file for every one of its 31 commands (100% coverage). The Cloud CLI previously had tests for only 3 commands. This PR closes that gap completely.
Before vs After
Test files added (84 new files)
Bugs discovered during testing (14 total)
Test patterns used
Following the Forge CLI conventions:
Test plan
./vendor/bin/pest— 378 tests, 409 assertions, 0 failures./vendor/bin/phpstan analyse— 0 errorsGenerated with Claude Code