fix(tests): Close Rust test-coverage gaps - #214
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR (DEVEX-721) closes remaining Rust test-coverage gaps from the TS→Rust port by adding targeted unit/smoke tests and small refactors to make critical paths testable without changing runtime behavior.
Changes:
- Extracts webhook event fetching into a helper and adds HTTP/auth-focused tests for the webhook events command.
- Adds CLI smoke/registry tests for bare invocation JSON envelope and
gddy treecompleteness. - Adds focused unit tests around hosting source upload validation/next-actions, extension deploy extension collection, security-scanner performance guards, and application client HTTP error mapping.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rust/src/webhook/mod.rs | Extracts HTTP fetch/parse into fetch_webhook_events and adds tests for auth/HTTP wiring. |
| rust/src/main.rs | Adds smoke tests validating root JSON discovery envelope and top-level command registry completeness via tree. |
| rust/src/hosting/nodejs/source/upload.rs | Extracts zip-path validation + next-action builder and adds unit tests for both. |
| rust/src/extension/security/mod.rs | Adds performance regression-guard tests for scan_bundle to catch algorithmic slowdowns. |
| rust/src/application/commands/deploy/extensions.rs | Adds tests for extension collection mapping and upload event shape. |
| rust/src/application/client.rs | Adds a test ensuring non-2xx GraphQL transport responses map to HTTP client errors. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+165
to
+176
| #[tokio::test] | ||
| async fn webhook_events_requires_auth() { | ||
| let cli = cli_engine::Cli::new( | ||
| cli_engine::CliConfig::new("gddy", "GoDaddy developer CLI", "gddy") | ||
| .with_min_stage(cli_engine::Stage::Experimental) | ||
| .with_module(crate::platform::module()), | ||
| ); | ||
| let output = cli | ||
| .run(["gddy", "platform", "webhook", "events", "--output", "json"]) | ||
| .await; | ||
| assert_eq!(output.exit_code, 2, "{}", output.rendered); | ||
| } |
jpage-godaddy
approved these changes
Aug 17, 2026
This was referenced Aug 18, 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.
TICKET: DEVEX-721
Re-establishes Rust test coverage the TS→Rust port dropped, across upload, CLI smoke/registry, security-scanner perf, deploy extension collection, and the application/webhook HTTP layer. All test-only or pure extract-for-testability refactors; no behavior changes. The majority of the mentioned work on the ticket was already done, this is closing small gaps and enhancing test coverage.
NOTES: