Skip to content

fix(tests): Close Rust test-coverage gaps - #214

Merged
mguerrero3-godaddy merged 9 commits into
mainfrom
fix/sync-rust-test-coverage
Aug 18, 2026
Merged

fix(tests): Close Rust test-coverage gaps#214
mguerrero3-godaddy merged 9 commits into
mainfrom
fix/sync-rust-test-coverage

Conversation

@mguerrero3-godaddy

@mguerrero3-godaddy mguerrero3-godaddy commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

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:

  • No full deploy-streaming pipeline test. Driving the real deploy command end-to-end would likely require mutating the process's current working directory (config is read via a relative path) while cargo test runs concurrently. This seemed larger than the ticket's scope.
  • Auth/OAuth coverage is not missing (mentioned on the ticket) it now lives upstream in the cli-engine dependency (48 tests in auth/pkce.rs, 6 in auth/storage.rs, plus a credential_store_config.rs integration suite), so we're not duplicating them here.

Copilot AI lite review requested due to automatic review settings August 17, 2026 21:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 tree completeness.
  • 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 thread rust/src/webhook/mod.rs
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);
}
@mguerrero3-godaddy
mguerrero3-godaddy merged commit e26912b into main Aug 18, 2026
4 checks passed
@mguerrero3-godaddy
mguerrero3-godaddy deleted the fix/sync-rust-test-coverage branch August 18, 2026 15:30
This was referenced Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants