-
Notifications
You must be signed in to change notification settings - Fork 13.6k
test(acp): add missing coverage for extensions command error paths #22934
Copy link
Copy link
Open
Labels
1.0/eng-excellencearea/extensionsIssues related to Gemini CLI extensions capabilityIssues related to Gemini CLI extensions capabilityeffort/small1 day or less: trivial logic, UI adjustments, docs1 day or less: trivial logic, UI adjustments, docshelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!We will accept PRs from all issues marked as "help wanted". Thanks for your support!kind/customer-issueIssues that were reported by customersIssues that were reported by customerspriority/p3Backlog - a good idea but not currently a priority.Backlog - a good idea but not currently a priority.status/bot-triaged
Metadata
Metadata
Assignees
Labels
1.0/eng-excellencearea/extensionsIssues related to Gemini CLI extensions capabilityIssues related to Gemini CLI extensions capabilityeffort/small1 day or less: trivial logic, UI adjustments, docs1 day or less: trivial logic, UI adjustments, docshelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!We will accept PRs from all issues marked as "help wanted". Thanks for your support!kind/customer-issueIssues that were reported by customersIssues that were reported by customerspriority/p3Backlog - a good idea but not currently a priority.Backlog - a good idea but not currently a priority.status/bot-triaged
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
ACP extension command behavior is implemented in
packages/cli/src/acp/commands/extensions.ts, but test coverage was missing for important error paths in the disable/uninstall flows.Problem
Two failure scenarios were not explicitly covered:
DisableExtensionCommandwhenextensionManager.disableExtension(...)throws.UninstallExtensionCommandwhenextensionManager.uninstallExtension(...)throws for a non-existent extension.Without explicit tests for these branches, regressions in user-facing error reporting can slip through.
Proposed Solution
Add and maintain test coverage in:
packages/cli/src/acp/commands/extensions.test.tsNew test cases:
returns error when disabling failsreturns error when uninstalling a non-existent extensionEach test should assert the exact command output format to ensure stable, user-facing error messages.
Acceptance Criteria
npm run test --workspace @google/gemini-cli -- src/acp/commands/extensions.test.tsRelated PR
Related to #22798