8000 Include test results in API response by n8maninger · Pull Request #684 · SiaFoundation/hostd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Include test results in API response #684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2025
Merged

Conversation

n8maninger
Copy link
Member

Changes the response of [PUT] /system/connect/test to include the full test results

@Copilot Copilot AI review requested due to automatic review settings May 24, 2025 17:48
@github-project-automation github-project-automation bot moved this to In Progress in Sia May 24, 2025
@n8maninger n8maninger moved this from In Progress to In Review in Sia May 24, 2025
@n8maninger n8maninger self-assigned this May 24, 2025
Copy link
@Copilot Copilot AI left a comment

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 updates the [PUT] /system/connect/test endpoint to return the full explorer.TestResult instead of just a boolean, and propagates this change through the config manager, API handlers, client, and interface definitions.

  • Expanded TestConnection to return a detailed TestResult and a success flag.
  • Updated logging in settings.go to include the full result.
  • Modified the API endpoint and client to encode and decode the new result.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
host/settings/troubleshoot.go Changed TestConnection signature and return values.
host/settings/settings.go Logged the full TestResult in debug messages.
api/endpoints.go Adjusted handler to encode the new TestResult.
api/client.go Updated client TestConnection to parse the result.
api/api.go Updated interface signature for TestConnection.
.changeset/added_endpoint_to_check_the_hosts_connectivity.md Added changeset entry for the new endpoint.
Comments suppressed due to low confidence (1)

host/settings/troubleshoot.go:62

  • [nitpick] The variable name successful is a bit ambiguous; consider renaming it to something like success or noErrors to make its intent clearer.
successful := true

@n8maninger n8maninger merged commit cd2bc12 into master May 24, 2025
11 checks passed
@n8maninger n8maninger deleted the nate/change-result branch May 24, 2025 17:50
@github-project-automation github-project-automation bot moved this from In Review to Done in Sia May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant
0